Validating a fax number is very similar to validating a phone number, so we'll take the discussion a bit wider than just about faxing.
What is phone number validation?
Phone number validation is the process of checking if a phone number is accurate. It lets you find out if the phone number you have for a business contact or customer is active and able to receive calls.
There are several aspects to phone number validation:
- Determining whether a given number could be correct, for its country and type (landline, mobile, special service number).
- Determining whether a number actually does connect to a live endpoint.
- Determining whether a live number actually leads to an expected person, business, or entity.
- Determining whether a number is capable of responding with the service you expected: voice, text, fax, data, etc.
Determining whether a number could be valid phone number
Phone number formats worldwide vary hugely, and any technique for validating them all will include thousands of rules and exceptions. Having said that, here are a few methods that should yield good-enough results:
- Check the National conventions for writing telephone numbers article on Wikipedia to determine what a number in your destination country generally looks like.
- Use an online phone number validation service, such as TextMagic or Dexatel.
- For developers: use a library such as libphonenumber.
- For developers #2: avoid trying to do this with regex.
Determining whether a number is a live phone number
- Make a test call from your office or mobile phone to see if you get an answer.
- If your available phones are blocked from the destination you wish to test, make that test call with an app like Google Voice or Skype.
Determining whether a live number actually leads to an expected person, business, or entity
- Look up the number in an official phone directory to find out if the number and owner match up to your expectations.
- Look up the number on social media sites, to make sure it's "valid" according to the public.
Determining whether a number has the capability to respond with the service you expected: voice, text, fax, data, etc.
You will likely have no choice but to dial the number using the service mode you want to use, and see if the response is by who you expected and whether it supports the mode you need.
Depending on how accurate you need your validation to be, you can use any or all of these methods.
For entertaining reading, check out a bunch of falsehoods people believe about phone numbers.