Determining phone validity means confirming three things: (1) the format is structurally correct (regex/E.164), (2) the number is assigned to a carrier in a real country, and (3) the number shows signs of recent activity. Most phone validity check tools only handle the first two. Trestle’s Phone Validation API includes a 0-100 score that indicates phone activity alongside line type and carrier, so you can decide which numbers are worth calling or messaging.
What Does It Mean to Validate a Phone Number? #
The question, on the surface, seems pretty straightforward, right? The phone number is either valid or invalid, and there should be tons of services providing that information. However, that’s not always the case.
The typical definition of phone validity covers two checks:
- Format validity: Confirm whether the local phone number syntax is valid.
- Carrier validity: Confirm if the number is even assigned to a carrier within a specific country. For example, a number is considered valid in the U.S. if it is part of the North American Numbering Plan.
If these two criteria are met, the number is considered valid, which is a fair and standard industry definition. Beyond that, a validation service typically also formats the number in local/international format, provides country code/name, etc. A few services also include the carrier and line type information of the phone (e.g., whether the phone is a mobile or landline and what carrier it belongs to).
This, of course, is valuable, but it misses an important question for most businesses: is there any sign of recent activity from this number?
Similarly, depending on the use case, businesses might want to know the line type in more fidelity than just mobile or landline (i.e., is the number a virtual number, like Google Voice or Skype?).
These virtual numbers are called non-fixed VoIP numbers. They’re easy to get online, but they don’t come with an associated physical address, and they don’t help with message deliverability. In fact, they’re most often used for promo abuse and fraudulent signups. The carriers providing these services are mostly Mobile Virtual Network Operator (MVNO) carriers. A phone validation service should be able to identify these carriers and flag their line types as non-fixed VoIPs. This allows businesses to filter out these numbers before sending a message, deprioritize leads tied to them, and flag sign-ups for potential fraud, which adds additional friction.
Trestle’s Phone Validation API provides these additional attributes and fidelity for businesses to make the right phone validity decisions. Trestle’s Phone Activity Score determines the activity associated with the phone, and anything below a score of 30 is generally a disconnected phone. Similarly, the line type returned includes non-fixed VoIPs by identifying these MVNO carriers. In addition, it also provides a prepaid flag that might be of value to certain customers.
Phone Validation Rule Sets for Common Use Cases #
Businesses, depending on their needs, should choose the right service and add the necessary level of checks as part of phone validation. For example: Businesses looking to buy/generate valid leads should not just check for whether the phone is valid or not but also whether the phone is connected or disconnected. Similarly, a business looking to avoid fraudulent signups should confirm the phone validity, as well as whether the line type is not a non-fixed VoIP.
Rule sets to use with Phone Validation API for various use cases for ‘true’ phone validation:
Lead Contactability:
is_valid = true && activity_score > 30
Fake Sign-Ups/Promo Abuse:
is_valid = true && line_type != “NonFixedVOIP”
SMS Enabled:
is_valid = true && activity_score > 30 && line_type == “Mobile”
If you’re implementing this in your own stack, check out our guides for JavaScript, Python, PHP, and React.
To test Phone Validation API, you can start a free trial, or to learn more, feel free to contact us.
Frequently Asked Questions #
How do I validate a phone number?
At a minimum, confirm the format is valid and the number is assigned to a carrier in a real country. For most business use cases, you’ll also want line type and an activity score to weigh how likely the number is to be in use.
What’s the difference between a number being valid and a number being in use?
A number can be valid (correctly formatted and assigned to a carrier) without being in active use. Phone validity confirms the former; an activity score helps indicate the latter.
Does phone validation work internationally?
Trestle’s Phone Validation API supports 200+ countries and territories and returns country code, line type, carrier, and Phone Activity Score for international numbers.