PDA

View Full Version : isValid does not indicate if field is valid - all form fields



srn
4 Nov 2011, 10:08 AM
Ext.onReady(function(){
var panel = new Ext.Panel({
items: [{
xtype: 'textfield',
id: 'foo',
value: 'foo'
}],
renderTo: Ext.getBody()
});
var foo = Ext.getCmp('foo');
foo.markInvalid();
console.log(Ext.getCmp('foo').isValid());
});
Above code outputs true, which is wrong.

mitchellsimoens
4 Nov 2011, 1:25 PM
The problem is it goes through the entire validation process when you call isValid