I have a question about flex. I have a form and a letter is required. I googled this and found the following solution:
<mx:FormItem label="Email" id="emailFormItem" width="100%" styleName="formEven" required="true">
<mx:TextInput id="emailTextInput" width="100%" text="{user.email}"/></mx:FormItem>
The problem is that when I click ok, the call is still being made. I know you need to check this yourself, but does anyone have an idea how I can check the field?
Decision:
I found a solution for this:
You can create a validator for each field that you want to check, and then create this function:
private function isValid():Boolean {
var failedValidators:Array = Validator.validateAll([emailValidator, userNameValidator, languageValidator, firstNameValidator, lastNameValidator]);
return failedValidators.length == 0;
}
It may be closed.
source
share