ソースを参照

Update phone.js

Correct the separator after the international prefix.
And now, all the four separator between the pairs of digits in the national part must be identical.
Daniel Lucazeau 11 年 前
コミット
12bac932b3
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/js/validator/phone.js

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

@@ -65,9 +65,9 @@
                     break;
 
                 case 'FR':
-                    // http://regexr.com/395dq
+                    // http://regexr.com/39a2p
                     value = $.trim(value);
-                    isValid = (/^(?:(?:(?:\+|00)33\D?(?:\D?\(0\)\D?)?)|0){1}[1-9]{1}(?:\D?\d{2}){4}$/).test(value);
+                    isValid = (/^(?:(?:(?:\+|00)33[ ]?(?:\(0\)[ ]?)?)|0){1}[1-9]{1}([ .-]?)(?:\d{2}\1?){3}\d{2}$/).test(value);
                     break;
 
                 case 'US':