Phone Number Validation with numverify
When we think about form validation, phone numbers aren't the most pressing bit of information to validate, but if the phone number is absolutely critical to your business or application, you'll want to do all you can to precisely ensure the number is correct. And the truth is most single-input phone number elements aren't masked and don't ask for enough information so users provide their phone number with and without dashes, parens, and even without country or area codes, making the phone number field a bit of an unsanitized, abused field.
How can you do more advanced phone number validation and analyzation? You can use numverify, a complete, reliable, easy to use phone number validation service!
Quick Hits
- numverify lets you sign up for free
- numverify is trusted by business.com and HomeAdvisor
- numverify's API is incredibly easy to use
- numverify provides JSONP functionality
- numverify not only validates the phone number but identifies country code and carrier
- numverify is from the same service provider for currencylayer, eversign, and streetlayer
Using numverify
Just like currencylayer and eversign, the numverify API is super easy to use, requiring you to only provide an API key and a phone number:
curl http://apilayer.net/api/validate?access_key=YOUR_ACCESS_KEY&number=14158586273
This call provides some really detailed information:
{ "valid": true, "local_format": "4158586273", "intl_format": "+14158586273", "country_code": "US", "country_name": "United States of America", "location": "Novato", "carrier": "AT&T Mobility LLC", "line_type": "mobile" }
Let's have a detailed look at the response:
valid
- The most basic desired state -- is the phone number valid or not?international_format
- Provides the phone number with its international formatcountry_prefix
- The phone number's international prefixcountry_code
andcountry_name
- Information about the phone number's country of originlocation
,carrier
, andline_type
- These fields provide an amazing level of detail about the phone number, including city, phone vendor, and whether the phone number is mobile, land line, premium, or toll free.
numverify is Awesome
When I think of validation, I think of regular expressions and basic data scrubbing, but numverify provides so much more information -- country, line type, and carrier information are awesome added bonuses to your traditional phone number insight. numverify is an awesome utility for keeping your phone number input valid and informative -- give it a try!
hi, do you know how i can use this service to check bulk numbers?
Thank you for the article.
One quick question, how do you use Numverify to validate numbers in a .csv format?