jQuery formValidator表单验证插件 (原文地址: http://t.cn/akICBq)
jQuery formValidator手册 http://shouce.jb51.net/phpcms/PHPCMS/formvalidator.html
页面引用方式:
<script src="<%=projectPath%/formValidator-4.1.3.js" type="text/javascript" ></script>
<script src="<%=projectPath%>/formValidatorRegex.js" type="text/javascript" ></script>
$("#ID").formValidator({
onShow : "请输入ID",
onFocus : "ID至少n个字符,最多m个字符",
onCorrect : "ID正确"
}).inputValidator({
min : n,
max : m,
onError : "你输入的ID非法,请确认"
}).regexValidator({
regExp : "ID",
dataType : "String",
onError : "ID格式不正确"
});
onShow : "请输入ID",
onFocus : "ID至少n个字符,最多m个字符",
onCorrect : "ID正确"
}).inputValidator({
min : n,
max : m,
onError : "你输入的ID非法,请确认"
}).regexValidator({
regExp : "ID",
dataType : "String",
onError : "ID格式不正确"
});