Creating Phone number validation

New one for you Jared. I cannot find a way to create a phone input field with basic validation. Any ideas?

Hey @gpo - going to move this to it’s own topic.

Phone numbers will vary from country to country, are you just interested in validating US numbers?

If not, can you give an example of the ones you want?

Thanks.

1 Like

Yes, starting with US phone numbers. Thank you

Hi @gpo

Try this API: https://numverify.com/

Returns JSON:

{
   "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"
}

There’s also this with 7,500 free look-ups a month.
https://dev.me/products/phone

Up to 1000 daily:




Twilio is a well known provider of SMS and have their own service if you only want the country.

:+1:

I don’t know about data protection with any of those services though…
Please research them carefully first.

1 Like

In addition to validating the phone number is input, if you have a standard format you are looking for you can format the number while the user is typing the number.

See: