我只想使用 Flex 的 ZipCode 验证器验证加拿大邮政编码。我是这样做的:
<mx:ZipCodeValidator
id="zipCodeTextInputFieldValidator"
domain="{ZipCodeValidatorDomainType.CANADA_ONLY}"
source="{this.zipCodeTextInputField}"
property="text"
triggerEvent=""
wrongCAFormatError="The Canadian postal code must be formatted 'A1B 2C3'."
/>
发布它也验证美国邮政编码。如果我给出923 424
了邮政编码,它会抛出验证错误说The ZIP code must be 5 digits or 5+4 digits.