StringValidation extension
A vast collection of validation utilities mapped as getters on String.
- on
Properties
- isValidBase64 → bool
-
Available on String, provided by the StringValidation extension
Checks whether the string is valid Base64 or Base64URL text.no setter - isValidE164Phone → bool
-
Available on String, provided by the StringValidation extension
Validates against E.164 format:+followed by 7–15 digits, no spaces.no setter - isValidEmail → bool
-
Available on String, provided by the StringValidation extension
RFC-5321-aligned. Handles subdomains, hyphens, multi-part TLDs. Still a heuristic — true validation requires sending a mail.no setter - isValidIsoDate → bool
-
Available on String, provided by the StringValidation extension
ISO 8601 date only:2024-01-31no setter - isValidJwt → bool
-
Available on String, provided by the StringValidation extension
Checks if the string looks like a JSON Web Token (header.payload.signature).no setter - isValidName → bool
-
Available on String, provided by the StringValidation extension
Accepts Unicode letters, spaces, hyphens, apostrophes, periods. Single names (mononyms) are valid. Max 100 chars guards against abuse.no setter - isValidPassword → bool
-
Available on String, provided by the StringValidation extension
At least 8 chars, one uppercase, one lowercase, one digit, one non-alphanumeric character (any — not a fixed whitelist).no setter - isValidPhone → bool
-
Available on String, provided by the StringValidation extension
Strips formatting then checks for 7–15 digits (ITU-T E.164 range). Does NOT enforce country-specific formats — use a package likephone_numbers_parserwhen you need locale validation.no setter - isValidUuidAny → bool
-
Available on String, provided by the StringValidation extension
Checks if the string is any valid UUID version 1 through 5.no setter - passwordStrength → PasswordStrength
-
Available on String, provided by the StringValidation extension
Returns which password requirements are unmet — useful for live UI feedback.no setter
Methods
-
isValidUsername(
{int min = 3, int max = 32}) → bool -
Available on String, provided by the StringValidation extension
Checks if the string is a conventional username.