PDA

View Full Version : getActiveError() for Ext 3.0



riuslex
22 Jun 2010, 10:39 PM
Hello, is there a way to reach the activeError for a field in Ext 3.0 ?

In Ext 3.2 is easy ...If i have a field i can use this.activeError, or for a form i can go to items[x] and get active error.

Unfortunately i do not know how to get to this activeError message in Ext 3.0

If anyone has a clue as to how this can be achieved please drop a line here. Thank you.

riuslex
22 Jun 2010, 11:26 PM
Funny how it takes 4 hours with no result during the evening and 5 minutes with success during the morning :)

I found the error message in qtip in dom.



for (var i = 0; i < myForm.items.length; i++) {
var object = myForm.items.items[i];
var label = object.fieldLabel;
error = object.el.dom.qtip;
if (!object.isValid()) {.....}
}


The above code will go through all objects of a form and will give you the label and error message of all invalid fields.

This is done much simpler in Ext3.2 as stated in the previous post.