- >
+ >
@@ -294,7 +294,7 @@
- >
+ >
@@ -302,7 +302,7 @@
- >
+ >
diff --git a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp
index dd226e1fe..e3a9c4643 100644
--- a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp
+++ b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp
@@ -182,8 +182,7 @@ $(function(){
checkIp = /\S+/;
}
return this.optional(element) || (checkIp.test(value) && (RegExp.$1 < 256 && RegExp.$2 < 256 && RegExp.$3 < 256 && RegExp.$4 < 256));
- },
- "请输入正确的IP!"
+ }
);
});
diff --git a/src/main/webapp/WEB-INF/views/cfg/multipleCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/multipleCfgForm.jsp
index 6176e91cf..525838eba 100644
--- a/src/main/webapp/WEB-INF/views/cfg/multipleCfgForm.jsp
+++ b/src/main/webapp/WEB-INF/views/cfg/multipleCfgForm.jsp
@@ -40,6 +40,19 @@ $(function(){
errorContainer: "#messageBox"
});
+ $.validator.addMethod(
+ "checkIp",
+ function(value, element, params) {
+ var checkIp;
+ if ($("[name$=ipType]").val() == 4) {
+ checkIp = /((25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))/;
+ } else {
+ checkIp = /\S+/;
+ }
+ return this.optional(element) || (checkIp.test(value) && (RegExp.$1 < 256 && RegExp.$2 < 256 && RegExp.$3 < 256 && RegExp.$4 < 256));
+ }
+ );
+
$("#ipSelect").change(function(){
if($(this).prop("checked")){
$("[name^='ipCfg']").removeProp("disabled");
@@ -56,6 +69,23 @@ $(function(){
$("[name^='ipCfg']").attr("disabled",true);
}
});
+
+ function myValidate(flag) {
+ if (flag) {
+ myValidate(false);
+ $("[name=ipCfg\\[http_ip_cfg\\]\\.srcIp]").each(function(){
+ $(this).rules("add", {
+ checkIp: true,
+ messages: {
+ required:''
+ }
+ });
+ });
+ } else {
+
+ }
+ }
+
$(".district").on("change",function(){
var text=$(this).find("option:selected").text().toLowerCase();
var other=$(this).parent("div").siblings(".otherValue");
diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js
index 30505d7b8..47a6425f5 100644
--- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js
+++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js
@@ -20,6 +20,7 @@
rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
range: $.validator.format("Please enter a value between {0} and {1}."),
max: $.validator.format("Please enter a value less than or equal to {0}."),
- min: $.validator.format("Please enter a value greater than or equal to {0}.")
+ min: $.validator.format("Please enter a value greater than or equal to {0}."),
+ checkIp: $.validator.format("Please enter a correct IP address.")
});
}(jQuery));
diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js
index 46dc78168..307dec287 100644
--- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js
+++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js
@@ -20,6 +20,7 @@
rangelength: $.validator.format("Пожалуйста, введите значение длиной от {0} до {1} символов."),
range: $.validator.format("Пожалуйста, введите число от {0} до {1}."),
max: $.validator.format("Пожалуйста, введите число, меньшее или равное {0}."),
- min: $.validator.format("Пожалуйста, введите число, большее или равное {0}.")
+ min: $.validator.format("Пожалуйста, введите число, большее или равное {0}."),
+ min: $.validator.format(" Пожалуйста, введите правильный IP - адрес.")
});
}(jQuery));
\ No newline at end of file
diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js
index aee0edc3f..533e091bb 100644
--- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js
+++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js
@@ -20,6 +20,7 @@
rangelength: $.validator.format("请输入一个长度介于 {0} 和 {1} 之间的字符串"),
range: $.validator.format("请输入一个介于 {0} 和 {1} 之间的值"),
max: $.validator.format("请输入一个最大为 {0} 的值"),
- min: $.validator.format("请输入一个最小为 {0} 的值")
+ min: $.validator.format("请输入一个最小为 {0} 的值"),
+ checkIp: $.validator.format("请输入一个合法的IP")
});
}(jQuery));