items: [{
id : 'mytest',
xtype : 'field.areaCode',
allowBlank : false,
// vtype:'uniqueareaCode',
listeners : {
                         blur : function(text){
Ext.Ajax.request({
method : 'POST',
url : 'api/machine/area/addValue',
params : {
     areaCode: text.getValue()
},
success : function(response){
   var value = response.responseText;
   var object =Ext.JSON.decode(value);
   var success = object.success;
   //text.setActiveError('dfd');
          if(success == false){
      
                                                             //text.setActiveError('error!');
        var aa = Ext.getCmp('mytest');
aa.Invalid('erroraaa');

}else{

console.debug('qqqq');
}
}
// ,
// failure : function(){
// Ext.Msg.alert('提示','加载失败!');
// }
});
},
scope : this
}
} onAddConfirm: function() {
var form = this.getAddWin().down('form');
data = this.getAddWin().down('form').getForm().getValues();
var bool = this.getAddWin().down('form').getForm().isValid();
var aa = Ext.getCmp('mytest');
var bool2 = aa.validate();
// if(bool==true && !aa._myDirty){
// this.addRecord(data);
// this.getAddWin().close();
// }
console.debug(bool);
console.debug(bool2);
if(bool == true){
this.addRecord(data);
this.getAddWin().close();
}
else {
Ext.Msg.alert('提示','输入有误!');
}

},
当输入框中提示错误时,var bool2 = aa.validate(); bool2 的值还是true???不应该验证不通过,是false