I toggle the 'required='true' property on a text form item, and the red asterisk disappears, yet the field is highlighted in RED and acts as though required="true" is still applied. Here is my code (click on 'Forget your pw?" to recreate the error.) I'm using Flex V3.
thanks, <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="474" height="483" layout="absolute"> <mx:Script> <![CDATA[ import mx.events.ValidationResultEvent; import flash.events.MouseEvent; import mx.controls.Alert; ]]> </mx:Script> <mx:EmailValidator id="v_email" source="{email}" property="text"/> <mx:StringValidator id="v_password" source="{mypassword}" tooLongError="Password must be between 6 and 8 chars" tooShortError="Password must be between 6 and 8 characters." property="text" maxLength="8" minLength="6" /> <mx:StringValidator id="v_screenname" source="{screenname}" tooShortError="Screen name must be at least 2 characters." property="text" minLength="2" /> <mx:Canvas width="100%" height="100%"> <mx:Form x="0" labelWidth="133" paddingTop="0" width="100%" height="50%" defaultButton="{manageAccountSubmit}"> <mx:FormHeading label="Your Account" /> <mx:FormItem label="Your Email Address" required="true"> <mx:TextInput id="email" /> </mx:FormItem> <mx:FormItem id="mypw" label="Password" required="true"> <mx:TextInput id="mypassword" displayAsPassword="true"/> </mx:FormItem> <mx:FormItem id="fiScreenname" label="Screen Name" required="true"> <mx:TextInput id="screenname" /> </mx:FormItem> <mx:FormItem> <mx:CheckBox id="forgotpw" label="Forgot your Password?" click="fiScreenname.required=!fiScreenname.required; mypw.required=!mypw.required;"/> </mx:FormItem> <mx:FormItem> <mx:Button id="manageAccountSubmit" label="Submit" /> </mx:FormItem> </mx:Form> </mx:Canvas> </mx:Application>