Skip to content

Support HK/Macao phone

Closes #302 (closed)

the phone number format is modified. not be number only ,need to add the + and region code in front of number.

Using E.164 format : + + region code + phone number

region region code i.e. des regex
Chinese mainland number +86 +8615623889878 +86 开头,第一位是【1】开头,第二位则则有【3,4,5,7,8,9】,第三位则是【0-9】,第三位之后则是数字【0-9】 1
Chinese Hongkong number +852 +85212345678 9或6开头后面跟7位数字 2
Chinese Macao number +853 +85312345678 66或68开头后面跟5位数字 3
  1. ^\+861[3|4|5|7|8|9][0-9]{9}$
  2. ^\+852([6|9])\d{7}$
  3. ^\+853[6]([8|6])\d{5}$

Then the regex will be

^\+852([6|9])\d{7}$|^\+861[3|4|5|7|8|9][0-9]{9}$|^\+853[6]([8|6])\d{5}$

@qk44077907

Qian Zhang (Gary) 编辑于

合并请求报告