浏览代码

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':