Use the standard ZipCodeValidator component, represented by the : ZipCodeValidator « Data Model « Flex
- Flex
- Data Model
- ZipCodeValidator
Use the standard ZipCodeValidator component, represented by the

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:TextInput id="input" text="enter zip" width="80" />
<mx:Model id="zipModel">
<root>
<zip>{input.text}</zip>
</root>
</mx:Model>
<mx:ZipCodeValidator source="{zipModel}" property="zip"
listener="{input}" trigger="{input}" />
</mx:Application>
Related examples in the same category