Assigning a validator to the data model
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Model id="userInfo"> <phoneInfo> <phoneNum>{phoneInput.text}</phoneNum> </phoneInfo> </mx:Model> <mx:PhoneNumberValidator id="pnV" source="{userInfo}" property="phoneNum" trigger="{phoneInput}" listener="{phoneInput}" /> <mx:TextInput id="phoneInput" /> <mx:TextInput id="zipCodeInput" /> </mx:Application>