easyui validatebox 验证集合

时间:2023-03-09 16:37:40
easyui validatebox 验证集合
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="easyui1.2.4/jquery-1.6.min.js" type="text/javascript"></script>
<script src="easyui1.2.4/jquery.easyui.min.js" type="text/javascript"></script>
<!--自定义验证-->
<script src="easyui1.2.4/validator.js" type="text/javascript"></script>
<link href="easyui1.2.4/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<script> $(function () { //设置text需要验证
$('input[type=text]').validatebox();
}) </script>
</head>
<body>
邮箱验证:<input type="text" validtype="email" required="true" missingMessage="不能为空" invalidMessage="邮箱格式不正确" /><br />
网址验证:<input type="text" validtype="url" invalidMessage="url格式不正确[http://www.example.com]" /><br />
长度验证:<input type="text" validtype="length[8,20]" invalidMessage="有效长度8-20" /><br />
手机验证:<input type="text" validtype="mobile" /><br />
邮编验证:<input type="text" validtype="zipcode" /><br />
账号验证:<input type="text" validtype="account[8,20]" /><br />
汉子验证:<input type="text" validtype="CHS" /><br />
远程验证:<input type="text" validtype="remote['checkname.aspx','name']" invalidMessage="用户名已存在"/>
</body>
</html>