Browse Source

#348: Update uri validator

phuoc 11 years ago
parent
commit
85bb445496
4 changed files with 7 additions and 11 deletions
  1. 1 1
      CHANGELOG.md
  2. 2 4
      dist/js/bootstrapValidator.js
  3. 2 2
      dist/js/bootstrapValidator.min.js
  4. 2 4
      src/js/validator/uri.js

+ 1 - 1
CHANGELOG.md

@@ -1,6 +1,6 @@
 # Change Log
 
-## v0.5.0 (not released yet)
+## v0.5.0 (not released yet) - It will be the big release
 
 __New Features__
 * [#121](https://github.com/nghuuphuoc/bootstrapvalidator/issues/121): Add events for form validate successfully or not

+ 2 - 4
dist/js/bootstrapValidator.js

@@ -4100,10 +4100,8 @@
                 "(?:" +
                 // IP address exclusion
                 // private & local networks
-                "(?!10(?:\\.\\d{1,3}){3})" +
-                "(?!127(?:\\.\\d{1,3}){3})" +
-                "(?!169\\.254(?:\\.\\d{1,3}){2})" +
-                "(?!192\\.168(?:\\.\\d{1,3}){2})" +
+                "(?!(?:10|127)(?:\\.\\d{1,3}){3})" +
+                "(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})" +
                 "(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})" +
                 // IP address dotted notation octets
                 // excludes loopback network 0.0.0.0

File diff suppressed because it is too large
+ 2 - 2
dist/js/bootstrapValidator.min.js


+ 2 - 4
src/js/validator/uri.js

@@ -64,10 +64,8 @@
                 "(?:" +
                 // IP address exclusion
                 // private & local networks
-                "(?!10(?:\\.\\d{1,3}){3})" +
-                "(?!127(?:\\.\\d{1,3}){3})" +
-                "(?!169\\.254(?:\\.\\d{1,3}){2})" +
-                "(?!192\\.168(?:\\.\\d{1,3}){2})" +
+                "(?!(?:10|127)(?:\\.\\d{1,3}){3})" +
+                "(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})" +
                 "(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})" +
                 // IP address dotted notation octets
                 // excludes loopback network 0.0.0.0