1.校验搜索框的时间,开始时间不能晚于结束时间
2.校验dns相应策略配置增加中的最大\小存活时间,最小存活时间不能大于最大存活时间
This commit is contained in:
@@ -155,6 +155,16 @@ jQuery.validator.addMethod("noBlankSpace", function(value, element) {
|
||||
return $.trim(value) != "";
|
||||
}, "不能填写空格");
|
||||
|
||||
jQuery.validator.addMethod("compareDate", function(value, element, param) {
|
||||
var startDate = $(param).val();
|
||||
if (startDate && value) {
|
||||
var date1 = new Date(startDate.replace(new RegExp(/-/gm), "/"));
|
||||
var date2 = new Date(value.replace(new RegExp(/-/gm), "/"));
|
||||
return date1 <= date2;
|
||||
}
|
||||
return true;
|
||||
}, "结束时间不能早于开始时间");
|
||||
|
||||
//掩码校验,超过两位不得以0开头
|
||||
jQuery.validator.addMethod("notStartZero",function(value, element) {
|
||||
if(value.length>1&&value.length<6){
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
areaIpPrefix:"Forbiden value: ",
|
||||
domainCheck:"Please enter a valid domain.",
|
||||
checkParent:"Configuration Type must match it's parent.",
|
||||
specServiceCodeCheck:"Protocol No is repeat."
|
||||
specServiceCodeCheck:"Protocol No is repeat.",
|
||||
compareDate:"The end time should not be earlier than the start time."
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
areaIpPrefix:"Forbiden value: ",
|
||||
domainCheck:"Please enter a valid domain.",
|
||||
checkParent:"Configuration Type must match it's parent.",
|
||||
specServiceCodeCheck:"Protocol No is repeat."
|
||||
specServiceCodeCheck:"Protocol No is repeat.",
|
||||
compareDate:"The end time should not be earlier than the start time."
|
||||
});
|
||||
}(jQuery));
|
||||
@@ -60,6 +60,7 @@
|
||||
areaIpPrefix:"禁止使用的值: ",
|
||||
domainCheck:"请输入有效的域名",
|
||||
checkParent:"配置类型必须与上级配置一致!",
|
||||
specServiceCodeCheck:"协议号重复"
|
||||
specServiceCodeCheck:"协议号重复",
|
||||
compareDate:"结束时间不能早于开始时间"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
Reference in New Issue
Block a user