Browse Source

fixed RU phone validation:
added 007 instead of +7: 007.123.123.1234
added dots as delimiter: 007.123.123.1234
added traditional typewriter format: +7 /095/ 123-1234

Igor Stepin 11 years ago
parent
commit
3a4fb7274a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/js/validator/phone.js

+ 1 - 1
src/js/validator/phone.js

@@ -126,7 +126,7 @@
 
                 case 'RU':
                     // http://regex101.com/r/gW7yT5/5
-                    isValid = (/^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$/g).test(value);
+                    isValid = (/^((8|\+7|007)[\-\.\/ ]?)?([\(\/\.]?\d{3}[\)\/\.]?[\-\.\/ ]?)?[\d\-\.\/ ]{7,10}$/g).test(value);
                     break;
 
                 case 'TH':