From 311fa5faf50c80cc1f6f2d6139489dad7cec4ac6 Mon Sep 17 00:00:00 2001 From: wangxin Date: Fri, 1 Jun 2018 09:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E9=AA=8C=E8=AF=81=E6=AD=A3?= =?UTF-8?q?=E5=88=99=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jquery-validation/1.11.0/jquery.validate.method.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js index 5dd9f381c..41e7835c2 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js @@ -296,14 +296,14 @@ jQuery.validator.addMethod("portCheck",function(value, element) { typeInt=$(element).parents(".row").parent(".row").find("select[name$='portPattern']").val(); } if(typeInt==1){//port 0~65535 - if(this.optional(element)||(/^(0|[1-9]+)$/.test(value))){ + if(this.optional(element)||(/^(0|[1-9][0-9]*)$/.test(value))){ return true; }else{ $.validator.messages.portCheck=$.validator.messages.portRange return false; } }else if(typeInt==2){// port -mask 0~65535/0~65535 - if(this.optional(element)||(/^(0|[1-9]+)\/(0|[1-9]+)$/.test(value) && RegExp.$2 <=65535)){ + if(this.optional(element)||(/^(0|[1-9][0-9]*)\/(0|[1-9][0-9]{0,4})$/.test(value) && RegExp.$2 <=65535)){ return true; }else{ $.validator.messages.portCheck=$.validator.messages.portMaskRange