Check is phone number is unique

Mar 25, 2015 at 9:32 PM
Hi,

I'm using your package and I have an extra property PhoneNumber for a user. Now I wonder what would be the best way to check if it's unique upon registration?

I'd created another table (UserPhones) and extend UserStorage. Would it be optimal?
Please give an advice.
Coordinator
Apr 3, 2015 at 4:12 AM
So checking phone numbers is a little tricky. I would recommend stripping all characters except the digits out and padding to 10 digits (assuming all phone numbers are U.S. based) and remove any leading ones.
Using a new table would give you the best performance, but if your total users are in the hundreds and not thousands you might be able to get away with querying the existing user table.
Hope this helps.
-Dave
Marked as answer by dotnetdavy on 9/6/2016 at 9:04 AM