About valid phone number verification

Now more and more places to use mobile phones to register.

Some time ago and a colleague had different views on the preliminary verification phone number.

A king thought verify your phone number in addition to detection is 11 digits, but also to detect the top three, is a valid (there is a legitimate table, A monarch for maintenance)

And I think that is not only necessary to detect the 11-digit number, add up to a first verify whether the 1.

General process is that I attempt to use an effective combination of three digits will continue to increase, this will lead to the need for a legal person table maintenance.

A king that the use and further testing the effectiveness of the legal number of tables will reduce the pressure on the server (SMS provider sends a request to reduce the number of times).

Recently I read "The Pragmatic Programmer" book. Inside there is a saying It's not whether you can remember, but when you forget the question.

Back up the detection numbers. A monarch may indeed have been concerned about a number of new head, in order to safeguard the legitimate table. But we can not guarantee will not forget this. Or, when you need to remember something much more time, there will always forget the day. What's more, personnel changes, the transfer of omission.

Therefore, in order to prevent these troubles, or do less need to worry about a lifetime. As for efficiency, we can think of ways.

Published 54 original articles · won praise 1 · views 20000 +

Guess you like

Origin blog.csdn.net/u011255131/article/details/78041509