1. #1
    Sencha User becevka's Avatar
    Join Date
    Oct 2008
    Posts
    53
    Vote Rating
    0
    becevka is on a distinguished road

      0  

    Default [CLOSED] Validator is skipped when value is blank.

    [CLOSED] Validator is skipped when value is blank.


    Dear GXT team.

    I found such bug in TextField code (GXT version 1.2.4).
    During processing validateValue(String value) it checks whether value is blank and if blank values are allowed it returns that value id valid without any respect to field validator, that can, by the way, allow field to be blank in some special cases.

    Of course, there are a lot of possibilities to work it around, but I rather prefer to be sure - when I've added validator I want it to be called.

    Thanks a lot.

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    This is by design and changing this would be a braking change and so cannot be done. GXT3 can maybe look into this.

  3. #3
    Sencha User becevka's Avatar
    Join Date
    Oct 2008
    Posts
    53
    Vote Rating
    0
    becevka is on a distinguished road

      0  

    Default


    Why it will be hard to change it in such way?

    Code:
    if (length < 1 || value.equals("")) {
              if (allowBlank) {
                  if (validator != null) {
                      String msg = validator.validate(this, value);
                      if (msg != null) {
                        markInvalid(msg);
                        return false;
                      }
                   }
                   clearInvalid();
                   return true;
              } else {
                markInvalid(getMessages().getBlankText());
                return false;
              }
            }

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Because it is braking change. You can override it if you need it this way. We cannot introduce this in GXT 1 and also not in GXT2

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."