Results 1 to 2 of 2

Thread: Validation is not working on Auto validate

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    Belarus, Minsk
    Posts
    15
    Vote Rating
    1
      0  

    Default 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?

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    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:

    Code:
        symbol = new TextField();
        symbol.addValidator(new RegExValidator("[^a-z]+", "Only uppercase letters allowed"));
        symbol.setAutoValidate(true);
        symbol.setName("symbol");
    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.

    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?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •