验证为美国电话存在 [英] Validate Phone Number Existence for United States

查看:156
本文介绍了验证为美国电话存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想验证在C#中美国一个给定的电话号码。是否有任何API或东西的,它可以帮助程序员以验证电话号码的存在。如果他们匹配了美国的电话号码格式,而且它们的存在我不想只验证。

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.

在此先感谢。

推荐答案

您可以验证的电话号码格式使用正则表达式,如这里列出的,但为了验证是否该电话号码确实存在,你就需要订阅保存当前数据在美国所有的电话号码,并发布到验证此类数据的方法的Web服务。我不认为这样的服务是免费的。

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.

此外,看一看的在SO此相关的问题

这篇关于验证为美国电话存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆