[ https://issues.apache.org/jira/browse/FLEX-26571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Mclean updated FLEX-26571: --------------------------------- Labels: easyfix easytest (was: ) > errorString does not reset the validators > ----------------------------------------- > > Key: FLEX-26571 > URL: https://issues.apache.org/jira/browse/FLEX-26571 > Project: Apache Flex > Issue Type: Bug > Components: mx: General > Affects Versions: Adobe Flex SDK 3.5 (Release) > Environment: Affected OS(s): Windows > Affected OS(s): Windows XP > Browser: Firefox 3.x > Language Found: English > Reporter: Adobe JIRA > Labels: easyfix, easytest > > Steps to reproduce: > with this kind of validation: > <mx:TextInput id="tovalidate" /> > <mx:Validator > id="myValidator" > source="{tovalidate}" > required="true" > property="text" > requiredFieldError="Field Required"/> > <mx:Button label="clean errorStrings" click="tovalidate.errorString=''"/> > 1. the TextInput is empty, hit tab to get out of it. valueCommit is properly > fired. The > validator run and the error show up. > 2. hit the button, the error is removed. everything seems ok. > 3. go back to the button, hit tab again, valueCommit is fired, the validator > run > but the error DOES NOT SHOW UP. > Expected Results: > > the error should show up again > > Workaround (if any): > do not use errorString, fire ValidationResultEvent programmatically like this: > var evt:ValidationResultEvent = new > ValidationResultEvent(ValidationResultEvent.VALID); > myValidator.dispatchEvent(evt); > the bug seems located in validationResultHandler in UIComponent.as > in this test: > if (msg && validatorIndex != -1 && errorArray[validatorIndex] != msg) > using only errorString, we have still errorArray[validatorIndex] == msg, > the errorArray is not cleaned up, so we do not enter in the following line: > dispatchEvent(new FlexEvent(FlexEvent.INVALID)); > so the TextInput does not show up the error. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira