initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
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);
|
||||
|
||||
} // namespace radiantwave::validation
|
||||
Reference in New Issue
Block a user