Clearing a validation error
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> import mx.events.ValidationResultEvent; private var vResult:ValidationResultEvent; private function validateAndSubmit():void { vResult = zipV.validate(); if (vResult.type==ValidationResultEvent.INVALID) return; } private function resetForm():void { zipInput.errorString = ''; } </mx:Script> <mx:ZipCodeValidator id="zipV" source="{zipInput}" property="text" /> <mx:Form> <mx:FormItem label="Enter ZIP code"> <mx:TextInput id="zipInput" /> </mx:FormItem> <mx:FormItem label="Enter Country"> <mx:TextInput id="cntryInput" /> </mx:FormItem> </mx:Form> <mx:Button label="Submit" click="validateAndSubmit();" /> <mx:Button label="Reset" click="resetForm();" /> </mx:Application>