Hello, How to remove validation programmatically from flex component This is my method
public static function validateRequired(txt:TextInput, errorMessage:String="This field is required"):Boolean
{
var v:Validator = new Validator();
v.listener = txt;
var result:ValidationResultEvent = v.validate(txt.text);
var returnResult:Boolean = (result.type == ValidationResultEvent.VALID);
//Alert.show("validation result is " + returnResult);
if (!returnResult) {
v.requiredFieldError = errorMessage;
}
return returnResult;
}
But, as each time i am creating new validator, so pop-up contains multiple messages like
This field is required.
This field is required.
How to remove error messages attached with component?