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

前端 未结 12 1518
鱼传尺愫
鱼传尺愫 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 02:00

    Store it however you prefer, but turn it into human readable format before you show it to the user. And please don't force your users to enter phone numbers in a format of your choosing, let them just type it in however they like.

    That's how I do it.

提交回复
热议问题