Home :: Software Products :: International Telephone Number Format

Perl Edition
Price: $69.95 USD


PDF Formatted Document Programmer's reference

Requires Acrobat Reader
Get Acrobat Reader

International Telephone Number Format

Perl Library
Telephone Number Format

With a single line of code you can validate and format a telephone number for any of the 40 countries supported by the library. The library's modular design allows new country support to be added or modified without changing your script.

Catch entry errors and invalid values at the point of data collection. These can be anything from a simple user mis-types to an intentional fraud attempt. If you sell on the Internet or collect international data you want to be sure the information is reasonably valid.

How does the library validate a telephone number? The first step is to identify what country rules and values to use. The library supports two ways to do this. First, it recognizes international telephone number syntax such as +521234567890 (Mexico). The second and preferred method to identify the country is for your script to pass the ISO 3166 two character country code.

The actual level of validation depends upon the country. For countries such as the United States and Canada, validation includes verifying the telephone area code (NPA) is valid for a particular state or province using current NANP assignments. For other countries such as the United Kingdom, the National Destination Code (NDC) is checked against current Oftel active geographic number ranges and assignments.

Pass your user entered telephone numbers directly to the library. It can handle virtually all input regardless of the format or common delimiters used. How would your form handle this entry, +1FLANOW9999 ? Most scripts would reject it, our library would interpret it as the United States, Florida telephone number +1 352 669-9999.

No complicated installation. If you can copy a file you can install the library. The current version contains 23 source files in all. This includes the main library interface and all country or region specific modules.

The country and region specific modules contain both code and data. For modules requiring larger data tables the data is physically stored within (embedded) and at the end of the module. When present this data uses simple comma separate value (CSV) syntax which could easily be copied to external data files.

With future enhancements in mind, some of the data records may contain more fields than currently used. For example, module de.pl (Germany) data includes city names matched to city codes though only the city codes are currently used.