Skip to main content

ASCIIUsernameValidator

This class provides validation for usernames using a regular expression that restricts input to ASCII characters. It ensures that values contain only unaccented alphanumeric characters, underscores, hyphens, periods, plus signs, or at symbols.

Attributes

AttributeTypeDescription
regexregex pattern = ^[\w.@+-]+\ZThe regular expression pattern used to validate that the username contains only unaccented letters, numbers, and specific symbols.
messagestringEnter a valid username. This value may contain only unaccented lowercase a-z and uppercase A-Z letters, numbers, and @/./+/-/_ characters.
flagsint = re.ASCIIThe regular expression flags applied during validation, specifically restricting character matches to the ASCII character set.

Constructor

Signature

def ASCIIUsernameValidator() - > null

Signature

def ASCIIUsernameValidator() - > null