PDA

View Full Version : Ext.form.Field always validates onBlur, impossible to disable


Alan Knowles
04-26-2007, 12:53 AM
There is no way to ensure that validation does not occur on blur.
ideally it should be configurable:


Ext.form.Field.prototype.validateOnBlur = true;

Ext.form.Field.prototype.onBlur = function(){
this.el.removeClass(this.focusClass);
this.hasFocus = false;
this.clearInvalid();
if((this.validationEvent != "blur") && this.validateOnBlur) {
this.validate();
}
var v = this.getValue();
if(v != this.startValue){
this.fireEvent('change', this, v, this.startValue);
}
this.fireEvent("blur", this);
}

jack.slocum
04-26-2007, 02:36 PM
I added:

if(this.validationEvent !== false && this.validateOnBlur && this.validationEvent != "blur"){