ActionScript based Validation
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF" width="300" height="150"> <mx:Script> private function validate():void{ if(myText.text.length < 10){ myText.errorString = "This field requires at least 10 characters"; } else { myText.errorString = null; } } </mx:Script> <mx:Panel title="Simple AS Validate" width="210" height="75"> <mx:HBox width="100%" height="100%" paddingLeft="3" paddingTop="3"> <mx:TextInput id="myText" width="100"/> <mx:Button label="Validate" click="validate()" /> </mx:HBox> </mx:Panel> </mx:Application>