xtype: 'textfield',
fieldLabel: 'Field',
allowBlank: false,
textValid: false,
validator: function(){
return this.textValid;
},
listeners : {
'change': function(textfield,newValue,oldValue) {
Ext.Ajax.request({
url: 'psc/validate',
params: { psc: value },
scope: textfield,
success: function(response){
if (response.responseText){
this.clearInvalid();
this.textValid = true;
} else {
this.markInvalid('field is not valid');
this.textValid = false;
}
}
});
}
}
}
EXT 表字段 ,异步验证。
参考http://stackoverflow.com/questions/8120852/extjs4-remote-validation
好像还有一个 ext的plugin 可以实现这个, 具体没找。