Phone numbers vary depending what country you are in. If your application is targeted at one country, then a regular expression may be suitable. Otherwise, you probably want to look at using a tool like Google’s LibPhoneNumber to handle all the possible variations.