A basic validator for requirement
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Validator source="{username}" property="text" required="true" /> <mx:Text text="Enter your username:" /> <mx:TextInput id="username" /> </mx:Application>