Mega Code Archive

 
Categories / Flex / Data Model
 

Use the standard ZipCodeValidator component, represented by the mx

" src="http://www.rntsoft.com/Code/FlexImages/UsethestandardZipCodeValidatorcomponentrepresentedbythemxZipCodeValidator.PNG"      <?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>