I am creating a phone book program that can read VCards. The problem is with the phone numbers. Usually they will be like in the United States:
0771234560
But if the phone number is from a foreign country, it will look like this.
+94771234560 or, possibly, (22)772324000
Now there are + and () icons! I am currently converting phone numbers (VCards contain them as strings) to numbers. However, if I resolve the phone numbers as strings, then the user can do something crazy, for example, insert the name as the phone number in the contact form.
How to save phone numbers as strings, but prevent problematic entries?
source share