(1)端口验证去掉正则比较部分
(2)白名单表单内容展示替换
This commit is contained in:
@@ -129,7 +129,7 @@ $(function(){
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipPattern" class="selectpicker show-tick form-control required">
|
||||
<option value="1" <c:if test="${_cfg.ipPattern==1}">selected</c:if>><spring:message code="subnet"/></option>
|
||||
<option value="1" <c:if test="${_cfg.ipPattern==1}">selected</c:if>><spring:message code="ip_subnet"/></option>
|
||||
<option value="2" <c:if test="${_cfg.ipPattern==2}">selected</c:if>><spring:message code="ip_range"/></option>
|
||||
<option value="3" <c:if test="${_cfg.ipPattern==3}">selected</c:if>><spring:message code="ip"/></option>
|
||||
</select>
|
||||
@@ -155,7 +155,7 @@ $(function(){
|
||||
<div class="col-md-6">
|
||||
<select name="portPattern" class="selectpicker show-tick form-control required">
|
||||
<option value="1" <c:if test="${_cfg.portPattern==1}">selected</c:if> ><spring:message code="port"/></option>
|
||||
<option value="2" <c:if test="${_cfg.portPattern==2}">selected</c:if>><spring:message code="subnet"/></option>
|
||||
<option value="2" <c:if test="${_cfg.portPattern==2}">selected</c:if>><spring:message code="port_mask"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="portPattern"></div>
|
||||
|
||||
@@ -264,7 +264,7 @@ jQuery.validator.addMethod("portCheck",function(value, element) {
|
||||
if(typeInt==1){//port 0~65535
|
||||
return this.optional(element)||(/^([0-9]+)$/.test(value) && (RegExp.$1 <=65535 && RegExp.$1 >=0));
|
||||
}else if(typeInt==2){// port -mask 0~65535/0~65535
|
||||
return this.optional(element)||(/^([0-9]+)\/([0-9]+)$/.test(value) && (RegExp.$1 <=65535 && RegExp.$2 <=65535 && RegExp.$1<RegExp.$2));
|
||||
return this.optional(element)||(/^([0-9]+)\/([0-9]+)$/.test(value) && (RegExp.$1 <=65535 && RegExp.$2 <=65535));
|
||||
}
|
||||
}, "请填写正确的端口");
|
||||
//ip v4转数字
|
||||
|
||||
Reference in New Issue
Block a user