pub enum StringSpecialCharLocale {
MustHaveSpecialChars,
MustHaveUppercaseAndLowercase,
MustHaveUppercase,
MustHaveLowercase,
MustHaveDigit,
}
Expand description
An enumeration defining various string constraints or requirements based on the presence of special characters, case sensitivity, or digits.
This enum can be used to specify which kind of validation or rules should be applied to a string across different locales, ensuring compliance with specific character requirements.
§Variants
-
MustHaveSpecialChars
Enforces that the string must contain at least one special character (e.g., symbols like@
,#
,$
, etc.). -
MustHaveUppercaseAndLowercase
Enforces that the string must contain at least one uppercase and one lowercase character. -
MustHaveUppercase
Enforces that the string must contain at least one uppercase character. -
MustHaveLowercase
Enforces that the string must contain at least one lowercase character. -
MustHaveDigit
Enforces that the string must contain at least one numeric digit (0-9).