The ZipCodeValidator class validates that a String has the correct length and format for a five-digit ZIP code, a five-digit+four-digit United States ZIP code, or Canadian postal code.
Static methods
staticvalidateZipCode(validator:ZipCodeValidator, value:Dynamic, baseField:String):Array<ValidationResult>
Convenience method for calling a validator. Each of the standard Flex validators has a similar convenience method.
Parameters:
validator | The ZipCodeValidator instance. |
---|---|
value | A field to validate. |
baseField | Text representation of the subfield
specified in the |
Returns:
An Array of ValidationResult objects, with one ValidationResult object for each field examined by the validator.
See also:
Constructor
Variables
allowedFormatChars:String
The set of formatting characters allowed in the ZIP code. This can not have digits or alphabets [a-z A-Z].
domain:String
Type of ZIP code to check.
In Haxe, you can use the following constants to set this property:
ZipCodeValidatorDomainType.US_ONLY
,
ZipCodeValidatorDomainType.US_OR_CANADA
, or
ZipCodeValidatorDomainType.CANADA_ONLY
.