Creating mandatory FormItems
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:StringValidator id="nameV" source="{nameTxt}" property="text" required="true"/> <mx:Validator id="surnameV" required="true" source="{surnameTxt}" property="text" requiredFieldError="Your Surname is a required field." /> <mx:Form id="myForm"> <mx:FormItem label="Insert Name" required="true"> <mx:TextInput id="nameTxt" /> </mx:FormItem> <mx:FormItem label="Insert Surname" required="true"> <mx:TextInput id="surnameTxt" /> </mx:FormItem> </mx:Form> </mx:Application>