Is there a compare validator in Flex? I searched but couldn’t able to find it. Is there any validator like compare validator ?
My example is how to check whether the password and confirm password is same using flex validator
<s:TextInput id="password" width="218" textAlign="left" contentBackgroundColor="#FFFFFF"/>
<s:TextInput id="confirmpassword" width="218" textAlign="left" contentBackgroundColor="#FFFFFF"/>
Having the following 2 email fields, for first we define a standard email validator and for the confirmation we define a custom email validator attached at the end of the answer.
Now we add the validators
And separately we need to define the EmailConfirmationValidator class which I have declared inside a “validators” package
In case you need to manually check the validators in your form. For example when before submitting the content for registration, use the following method