It's getting stranger now. I went back into my CSS file and removed the statement for errorColor on TextInputs.
However, it still turns the TextInput border my old customized color upon invalid entry, and the odd behavior described in my original post still remains.
I even tried setting errorColor to be the same as the default borderColor, and even after that the border still turns orange. ?!?!
Anyone have any ideas on this?
1 person found this helpful
Hi Paul, I think the problem is the trigger event, why don't you better use :
Because the thing is valueCommit is dispatched when your user changes the focus or when you programmatically change the data.
Thank you. Switching to the "change" event does seem to fix the double-valid oddity.
The only thing is that now, since I have a minimum length, the 'invalid' formatting shows up as soon as the user starts typing, until the string passes the minimum length.
You're welcome the thing is that the changes trigger the event every time something changes in the textinput what you could do is add an event listener to change event and there add some validation to verify if the user input has a minimum length then don't validate and once the user reaches a determine length trigger the validation, and also trigger it when the user focusOut of your text input
I had been thinking along those same lines. Glad to know I wasn't way off base with that concept. I'll give it a try and see what I can make happen.
I've also encountered this hard to explain behaviour with Flex validators.
One line fix would be to call
at the end of the method "formatControlErrorStatus"
I was curious, why this extra call is needed, thus I've described my findings at my blog http://www.jabbypanda.com/blog/?p=54
(the reading requires knowledge of validation/invalidation mechanism in Flex http://frishy.blogspot.com/2007/10/validationinvalidation-mechanism.html)