Explicitly handing validator validation events
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> import mx.events.ValidationResultEvent; private function handleValid(event:ValidationResultEvent):void { if(event.type==ValidationResultEvent.VALID) submitButton.enabled = true; else submitButton.enabled = false; } private function submitForm():void { } </mx:Script> <mx:ZipCodeValidator source="{inputZip}" property="text" valid="handleValid(event);" invalid="handleValid(event);" /> <mx:TextInput id="inputZip" /> <mx:TextInput id="inputPn" /> <mx:Button id="submitButton" label="Submit" enabled="false" click="submitForm();" /> </mx:Application>