I am creating a phonebook program that can read VCards. The problem is with phone numbers. Normally, they will be like this in the United States:
0771234560
Don't use a numeric type for phone numbers, stick with a String
.
Do some form of input validation. Define some restrictions on your phone numbers, and when reading the card, check the String
against your format: if the phone number doesn't match your restrictions, then reject it.
Search around this site for questions/answers regarding phone number validation.