2

I wanna validate a given phone number for United States in C#. Is there any API or something for that which helps programmers to validate phone numbers existence. I don't wanna only validate if they're matching the format of phone numbers for USA but also their existence.

Thanks in advance.

Tarik
  • 79,711
  • 83
  • 236
  • 349
  • 5
    Don't all numbers in the US start with 555? That's my understand from all the Hollywood movies I've ever seen :-) – paxdiablo Jul 17 '09 at 08:03

2 Answers2

2

You could validate phone number formats using a Regex such as those listed here, but in order to validate if the phone number really exists you would need to subscribe to a web service that holds current data for all phone numbers in the United States and publishes a method to validate such data. I don't think such a service would be free.

Also, take a look at this related question on SO.

Community
  • 1
  • 1
Cerebrus
  • 25,615
  • 8
  • 56
  • 70
0

Actually I've found something like this : MelissaData.com They're offering a web service which verifies address,phone and name information.

Tarik
  • 79,711
  • 83
  • 236
  • 349