如何用JQUERY表单验证控件进行验证 是否为空
如何用JQUERY表单验证控件进行验证 是否为空
//验证文本框内容不能为空
$("#perWorkStdate").formValidator({ tipid:"perWorkStdatetip",isEmpty:false, onshow: "*", onfocus: "*日期不能为空", oncorrect: "*" }).inputValidator({ min: 1, empty:false,onerror:"*日期不能为空"});
我这么写不好使啊,验证不了
我发现这个验证核心代码formValidator.js有这个
isEmpty: function(id) {
if ($("#" + id).get(0).settings[0].empty && $.formValidator.getLength(id) == 0) {
return true;
} else {
return false;
}
},
谁知道这个验证是不是为空该怎么使用???