电话号码格式和验证库 [英] Phone number format and validation library
问题描述
这个问题,要求使用Java中的电话号码格式API让我想知道为什么这样的API似乎不存在.给定验证在 Apache Commons 下可用的类,我以为会包含这样的API.
This question asking for a phone number format API in Java got me wondering why such an API doesn't seem to exist. Given the number of validation classes available under Apache Commons, I would have thought such an API would be included.
我的问题是,有人知道任何语言可用的电话号码格式/验证库,可以用作小型Java开源项目的模型吗?此外,除了全世界使用大量不同的电话号码格式外,有人是否会出于任何原因知道这样的项目不可行?
My question is, does anyone know of a phone number formatting/validation library available in any language that could be used as a model for a small Java open source project? Also, other than the large number of different phone number formats used throughout the world, does anyone know of any reason that such a project would be infeasible?
推荐答案
任何语言的API: Number :: Phone :: US ).
Such an API in any language: Number::Phone (example submodule: Number::Phone::US).
数据:国际电联的国家编号计划索引.
Data: the ITU's National Numbering Plans index.
这篇关于电话号码格式和验证库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!