PDA

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



Alan Knowles
25 Apr 2007, 8:53 PM
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
26 Apr 2007, 10:36 AM
I added:

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