Is it better to store telephone numbers in some canonical format or “as entered”?

前端 未结 12 1501
鱼传尺愫
鱼传尺愫 2020-12-11 00:59

Storing a telehone number in some kind of canonical format has several advantages from a programmers point of view, but it might confuse the user, if sudde

12条回答
  •  [愿得一人]
    2020-12-11 01:48

    I would keep the original entered mess but would also insert a cleaned up form in the database. Which only kept the numbers less punctuation and spaces. Using the cleaned form would allow easy lookups without worrying about different possible entered styles.

提交回复
热议问题