Flex:从ZipCodeValidator中禁用wrongLengthError

时间:2013-03-05 15:02:01

标签: flash flex flash-builder

是否可以从ZipCodeValidator中禁用wrongLengthError?我只想展示wrongCAFormatErrorwrongUSFormatError

如果我没有将wrongLengthError指定为<mx:ZipCodeValidator,则会显示默认的错误长度错误消息。

1 个答案:

答案 0 :(得分:1)

这样的事情:

<mx:ZipCodeValidator
    id="zipCodeValidator"
    domain="{ZipCodeValidatorDomainType.US_OR_CANADA}"
    source="{input}" 
    property="text" 
    wrongLengthError="{zipCodeValidator.wrongUSFormatError + '\n' + zipCodeValidator.wrongCAFormatError}"
/>