-
4 Oct 2012 12:15 AM #1
Validation is not working on Auto validate
Validation is not working on Auto validate
- set TextArea component autovalidate to true.
- set max length to 10 for example
- start application, start type in component - it does not validate, it validates only when blur event occures
- the problem is in following - new component value is set to component only on blur event, all other time it validates old value
Maybe anyone has some workaround?
-
5 Oct 2012 4:28 PM #2
I haven't tested this exact use case (TextArea with MaxLengthValidator), but I have at least one case that is working with both a) validation and b) auto-validate:
http://www.sencha.com/examples/#Exam...e:basicbinding has a TextField with a RegexValidator, written like this:
The regex is a little confused - it only checks that there is at least one non-lower case letter in the field - but this can still be used to test. Empty out the Symbol field, and type just the letter a. This will cause a validation error to occur, and adding any capital letter (or any number, or punctuation, etc) will cause the error to disappear. You do need to wait for a moment to allow it to appear, but it isn't required to blur.Code:symbol = new TextField(); symbol.addValidator(new RegExValidator("[^a-z]+", "Only uppercase letters allowed")); symbol.setAutoValidate(true); symbol.setName("symbol");
There is no special handling for RegExValidator that doesn't happen for the MaxLengthValidator as well - can you post a test case of this bug that implements EntryPoint, and details of a particular browser?
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote