Is there a standard for phone numbers?

后端 未结 2 2009
清酒与你
清酒与你 2021-02-01 19:56

Before you say that this has already been asked, know that I\'ve already reviewed these:

  • Is there a standard for storing normalized phone numbers
2条回答
  •  醉酒成梦
    2021-02-01 20:45

    There is a lot of local countries standards. On one of my projects I had the same problem. Solved as:

    1. In DB everything stored as numbers: 123456789
    2. Depending on selected web page language, this number pre-formatted when page loads.

    Examples:

    • France, Luxemburg format phone numbers like 12.34.56.78.90 or 12 34 56 78 90
    • Germany: 123 45 67 or 123-45-67
    • Great Britain: 020 1234 1234 or 1234 01234 12345
    • Italy, Netherlands: 12 1234567 or 020-1234567
    • CIS countries: 123 123-45-67

提交回复
热议问题