#pragma once #include namespace radiantwave::validation { // Returns true if `email` looks like a valid email address (single '@', // non-empty local and domain parts, no whitespace, domain has at least two // dot-separated labels). bool isValidEmail(const std::string& email); // Reduces `input` to uppercase alphanumeric characters, capped at 16. // Used for license key entry: the dash separators are re-inserted on display. std::string sanitizeLicenseKey(const std::string& input); // Formats a sanitized license key as four dash-separated groups of four // characters (XXXX-XXXX-XXXX-XXXX). Partial input yields partial output. std::string formatLicenseKey(const std::string& sanitized); // The maximum length of a System Name (per the API contract). constexpr size_t SYSTEM_NAME_MAX_LENGTH = 40; // Removes leading and trailing ASCII whitespace from `input`. std::string trim(const std::string& input); // Returns true when `name` (already trimmed) is a valid System Name: 1-40 // characters. Empty or whitespace-only names are invalid (never a clear). bool isValidSystemName(const std::string& name); } // namespace radiantwave::validation