drsxobip501258 2017-06-22 13:03
浏览 177

电话号码验证并检查E164使用PHP而不使用libphonenumber-for-php库

I want to check entered phone number is valid E164 formate phone number if not then convert in proper E164 formate

  • 写回答

1条回答 默认 最新

  • dsy1971 2018-04-12 11:18
    关注

    Use Regular Expressions in PHP.

    The regex I had to come up with that works along with '+' sign along with the digits which much reside between 10~15 is as follows:

    ^\++?[0-9]\d{6,14}$

    And this works well. You can check it out on Regex101.

    评论

报告相同问题?