PDA

View Full Version : Letting the js know validation result?



hevole
27 May 2009, 7:36 AM
now that i have tried to use vtype to validate a textfield,

myTextField = new Ext.TextField({
{
fieldLabel:'Email Address',
vtype:'email',
}});

it would display the error message to the user if the input is not a valid email, but how could i let the javascript know that the input is not a valid one, so that it could act accordingly? is there some boolean value that i can set up or predefined like myTextField.inputIsValid that is true if the input is valid and false otherwise?

thanks in advance.

Animal
27 May 2009, 7:54 AM
Use an change listener and

http://extjs.com/deploy/ext-3.0-rc1.1/docs/?class=Ext.form.Field&member=validate

tryanDLS
27 May 2009, 8:13 AM
Moved..again.. Please post in the correct forum.

hevole
27 May 2009, 9:14 AM
thanks and sorry