52,797
社区成员
发帖
与我相关
我的任务
分享
validator://指定一个验证的方法
如:
{
xtype:'textfield',
fieldLabel : '子串',
validator:validateSubstring,
invalidText:'输入的字符串必须是主串中的子串',
anchor:'90%'
}
function validateSubstring(value)
{
if(textField1.getValue().indexOf(value) < 0)
return false;
else
return true;
}