我无法禁用表单验证失败的按钮。我想使用 regex:/^[0-9]+(,[0-9]+)*$/
进行文本区域验证。我想禁用activatebutton
.
我尝试formBind
并监控验证仍然无法正常工作。
这是代码:
items: [{
xtype: 'container',
layout: {
type: 'column'
},
items: [{
columnWidth: .75,
layout: "form",
monitorValid: true,
items: {
fieldLabel: 'Please Enter Activation Id',
name: 'Activate',
xtype: 'textarea',
msgTarget: 'under',
growMax: 200,
allowBlank: false,
blankText: "Please Enter Comma separated AssetIds",
regex: /^[0-9]+(,[0-9]+)*$/,
anchor: '100%'
}
}, {
columnWidth: .25,
items: {
xtype: 'button',
name: 'button',
id: 'activatebutton',
width: 100,
text: 'Set for auto-activation',
formBind: true,
listeners: {
click: function () {
shared.Notifier.success('The requ ');
this.seForActivation();
},
scope: this
}
}
}]
}]