Hybrid View

  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,966
    Vote Rating
    130
    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,966
    Vote Rating
    130
    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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar