An Overview of Phone Number Validation Methods
The vast proliferation of personal data in the last few decades has made accurate and precise data gathering and validation more important than ever for business owners. One of the most useful data points is the personal phone number. The Pew Research Center reports that approximately 97% of Americans own a mobile phone and that the rest of the world is fast approaching this number. With such a ubiquitous technology, businesses must be able to handle telephone number information to avoid fraud and scamming and ensure they reach their target demographic by verifying the identities associated with the numbers.
Luckily, numerous phone number validation methods exist to ensure the validity of personal phone numbers. These methods range from simple checks against publicly available data to directly polling the number to determine whether or not it is active. Here, we will review some of the common methods in use and the advantages and disadvantages of each.
Types of phone number validation methods:
Regular Expressions
Regular expressions are sequences of characters that define a search pattern. In the context of phone number validation, they’re used to determine whether or not a given phone number is properly formatted according to a given specification. For instance, a web form might use regular expressions to check whether a phone number entered by a user matches the NANP (North American Numbering Plan) format: NXX-NXX-XXXX where N is any number between 2 and 9 and X is any number between 0 and 9. Generally, regular expressions are used in tandem with another verification method as these only ensure adherence to a desired format.
Pros:
Cons:
Line Test
This method tests the line directly by calling the number under consideration and analyzing the response. Different tones and signals received during this call give information about the status of the number and its current use. This test is rather slow but can be performed asynchronously using AJAX methods while the user fills out the web form. Once a properly formatted number is submitted, it can be tested without interrupting the user.
Pros:
Cons:
Turing Test
The Turing test (named after its inventor, Alan Turing) was devised to distinguish between the behavior of computers and that of humans. The original idea was that a human would pass notes to two different entities (one human and one computer) and try to determine which one was the computer. We can ensure a live number by employing a reverse Turing test. This means we program the computer to contact a number and request a response to determine if the entity on the other end is a human rather than another computer. The phone number is considered live if we get the desired response (usually by pressing a certain number).
Pros:
Cons:
Database Check
This method of number validation checks the number provided against a database of personal information gathered from public sources. Depending on the depth and quality of the database, the check may reveal a great deal of information about the number. This method is quite fast, but the quality and reliability of the results depend on the database used.
Pros:
Cons:
Phone Number Verification
(Two-step Authorization)
This method verifies the legitimacy of the phone subscriber. The subscriber submits a number they wish to use, and they are then provided with an authorization token. A call is made to the provided number, and the token is requested. This ensures the service subscriber is either registered under the given number or at least has access to it. Examples of this method can be seen in services like Google Voice, and some financial institutions use variants of this method to certify a genuine user.
Pros:
Cons:
Real-Time Phone Number Validation
(What we do)
Real-time phone number validation is done by pinging the data used by the switch of the phone number provided to check if phone number is active / connected. It also uses telecommunications data to provide information, such as whether the number is a mobile or landline and the carrier’s name. This method combines the speed of the database method with the accuracy of the line test, making it an effective option.
Pros:
Cons: