1. #1
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    0
    r_honey is on a distinguished road

      0  

    Default Getting the error message of a form field

    Getting the error message of a form field


    I am trying to get the error message of a form field, that is displayed by default as a tip on hovering over the field. I am able to get whether the field is valid or not by using either of validate() or isValid() functions.

    How do I get the actual error message that has marked the field as invalid? I need to show all error messages for all fields on the form together in one place.

  2. #2
    Ext User
    Join Date
    Oct 2009
    Posts
    4
    Vote Rating
    0
    dilip.khichade is on a distinguished road

      0  

    Default


    You can do something like this:
    var errMsg = "";
    xform.getForm().items.each(function(field) {
    if (errMsg === "" && field.isValid() == false) {
    errMsg = "Error in field " + field.fieldLabel
    + ". " + field.el.dom.qtip;

    }
    });

  3. #3
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    0
    r_honey is on a distinguished road

      0  

    Default


    Well, this is a pretty old thread. Since then, I have moved to Ext 3.x, which provides getAllErrors() and getActiveError() method for a form field out of the box.

    Still, thanks for taking time out to reply.

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