var me = this;
if (!this.getForm().isValid()) {
//findout invalid fields
var fields = me.getForm().getFields();
var errorField = '';
for (var i = 0; i < fields.getCount() ; i++) {
var field = fields.getAt(i);
if (!field.isValid()) {
if (errorField.length > 0) errorField += "<br>";
errorField += field.getFieldLabel();
}
}
Ext.Msg.alert('Validate failed in field(s):<br>'+errorField);
return;
}
沒有留言:
張貼留言