The EmailValidator class validates that a String has a single @ sign, a period in the domain name and that the top-level domain suffix has two, three, four, or six characters. IP domain names are valid if they are enclosed in square brackets. The validator does not check whether the domain and user name actually exist.
You can use IP domain names if they are enclosed in square brackets; for example, myname@[206.132.22.1]. You can use individual IP numbers from 0 to 255.
Static methods
staticvalidateEmail(validator:EmailValidator, value:Dynamic, baseField:String):Array<ValidationResult>
Convenience method for calling a validator from within a custom validation function. Each of the standard Flex validators has a similar convenience method.
Parameters:
validator | The EmailValidator instance. |
---|---|
value | A field to validate. |
baseField | Text representation of the subfield
specified in the value parameter.
For example, if the |
Returns:
An Array of ValidationResult objects, with one ValidationResult object for each field examined by the validator.
See also:
Constructor
Variables
invalidDomainError:String
Error message when the suffix (the top level domain) is not 2, 3, 4 or 6 characters long.
invalidIPDomainError:String
Error message when the IP domain is invalid. The IP domain must be enclosed by square brackets.
tooManyAtSignsError:String
Error message when there is more than one at sign in the e-mail address. This property is optional.