Authored by xuqi

ip regx

@@ -90,7 +90,7 @@ @@ -90,7 +90,7 @@
90 90
91 function validateIP(ip) { 91 function validateIP(ip) {
92 if (ip === 'localhost' || 92 if (ip === 'localhost' ||
93 - /^(0|[1-9]?|1\d\d?|2[0-4]\d|25[0-5])\.(0|[1-9]?|1\d\d?|2[0-4]\d|25[0-5])\.(0|[1-9]?|1\d\d?|2[0-4]\d|25[0-5])\.(0|[1-9]?|1\d\d?|2[0-4]\d|25[0-5])$/.test(ip)) 93 + /^(\d)+\.(\d)+\.(\d)+\.(\d)+$/.test(ip))
94 { 94 {
95 $ip.closest('.form-group').removeClass('has-error'); 95 $ip.closest('.form-group').removeClass('has-error');
96 return true; 96 return true;