EXT field remote validator

{
   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 表字段 ,异步验证。 this

参考http://stackoverflow.com/questions/8120852/extjs4-remote-validation url

好像还有一个 ext的plugin 能够实现这个, 具体没找。 rem

相关文章
相关标签/搜索