Using the ZipCodeFormatter with format : ZipCodeValidator « Data Model « Flex
- Flex
- Data Model
- ZipCodeValidator
Using the ZipCodeFormatter with format

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
[Bindable]
private var storedZipCode:Number=123456789;
</mx:Script>
<mx:ZipCodeFormatter id="ZipCodeDisplay" formatString="#####-####" />
<mx:TextInput text="{ZipCodeDisplay.format(storedZipCode)}" />
</mx:Application>
Related examples in the same category