(1)域名页面keyword字段说明改为域名

(2)加入域名验证方法domainCheck,目前没有对现在已经存在的顶级域名进行校验,主要是顶级域名较多,枚举起来困难。
This commit is contained in:
wangxin
2018-06-29 14:06:02 +08:00
parent 07550c8137
commit 11a7956879
12 changed files with 22 additions and 10 deletions

View File

@@ -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) {

View File

@@ -49,6 +49,7 @@
ip_subnet: "Subnet",
ip_range: "ip Range",
timeout:"timeout",
areaIpPrefix:"Forbiden value: "
areaIpPrefix:"Forbiden value: ",
domainCheck:"Please enter a valid domain."
});
}(jQuery));

View File

@@ -47,6 +47,7 @@
ip_subnet: "Subnet",
ip_range: "ip Range",
timeout:"timeout",
areaIpPrefix:"Forbiden value: "
areaIpPrefix:"Forbiden value: ",
domainCheck:"Please enter a valid domain."
});
}(jQuery));

View File

@@ -51,6 +51,7 @@
ip_subnet: "Subnet",
ip_range: "ip Range",
timeout:"超时",
areaIpPrefix:"禁止使用的值: "
areaIpPrefix:"禁止使用的值: ",
domainCheck:"请输入有效的域名"
});
}(jQuery));