Import ZipCodeValidatorDomainType
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> import mx.validators.ZipCodeValidatorDomainType; </mx:Script> <mx:ZipCodeValidator id="zipCodeValidator" source="{zipCodeTextInput}" property="text" domain="{ZipCodeValidatorDomainType.US_OR_CANADA}" required="false" /> <mx:TextInput id="zipCodeTextInput" /> </mx:Application>