Validating Phone Numbers

Not Yet Reviewed

I've long searched for a way to validate my database of employee phone numbers and recently found what I was searching for. Google developed a library in JS that can be incorporated into code to test whether phone numbers are technically correct. This is especially useful for international phone numbers.

It's called libphonenumber and can be found in GitHub. Someone also ported it over to .Net using C# which is what I used.

0

Comments

3 comments
Date Votes

Please sign in to leave a comment.

  • Thanks for sharing! I think we actually use that library behind the scenes to validate the phone numbers when they come in through the UI or the API. But it sounds like you want to filter or flag out numbers before you get them over to xM.

    0
  • I use ZipSync to load my data into xMatters and it only notifies me of the most egregious errors. Using this library I was able to identify many more issues -- UK cell phones with area codes, invalid US area codes, numbers missing a country code, and more.

    0
  • Thank you Loring. We are actually using that library in several places of our application. You'll see it featuring prominently in our new devices UI: https://support.xmatters.com/hc/en-us/articles/206702276-Blue-Steel-Early-Access-Highlights#MyDevices. You'll notice our new screens don't make any mention of "area code" and when you play with it you'll see that we convert local dial strings to international dial strings for tricky numbers like those in the UK... all automagically using the library.

    If you are on our EAP (https://support.xmatters.com/hc/en-us/articles/206702276-Blue-Steel-Early-Access-Highlights#EAP) you can play with it now... or it will be available in all non-production environments Feb 25th, and in production on Mar 3rd when Blue Steel rolls out.

    0

Didn't find what you were looking for?

New post