(1)域名页面keyword字段说明改为域名
(2)加入域名验证方法domainCheck,目前没有对现在已经存在的顶级域名进行校验,主要是顶级域名较多,枚举起来困难。
This commit is contained in:
@@ -165,6 +165,13 @@ jQuery.validator.addMethod("notStartZero",function(value, element) {
|
||||
}
|
||||
return true;
|
||||
}, "请填写正确的数值");
|
||||
jQuery.validator.addMethod("domainCheck",function(value, element) {
|
||||
var regexp=/^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/;
|
||||
if(this.optional(element)||regexp.test(value)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
//ip地址校验
|
||||
jQuery.validator.addMethod("ipCheck",function(value, element) {
|
||||
|
||||
Reference in New Issue
Block a user