Validating telephone numbers

24-Sep-2016 13:49

A j Query plugin for entering and validating international telephone numbers.

separate Dial Code Type: Enable formatting/validation etc.

To include the Java code in your application, either integrate with Maven (see wiki) or download the latest jars from the Maven repository.

Javadoc is automatically updated to reflect the latest release at

Within an area code, you need only dial (the verb hasn’t changed, even though telephones no longer have a dial) the seven-digit exchange code and number; otherwise, you must dial the complete ten-digit number, often with a prefix.

Our exercise today asks you to validate a telephone number, as if written on an input form.

separate Dial Code Type: Enable formatting/validation etc.

To include the Java code in your application, either integrate with Maven (see wiki) or download the latest jars from the Maven repository.

Javadoc is automatically updated to reflect the latest release at

Within an area code, you need only dial (the verb hasn’t changed, even though telephones no longer have a dial) the seven-digit exchange code and number; otherwise, you must dial the complete ten-digit number, often with a prefix.

Our exercise today asks you to validate a telephone number, as if written on an input form.

These functions check the validity of a UK business or domestic telephone number (including those associated with mobile networks) specified by the supplied parameter. premium lines, adult services, radio-paging services, numbers allocated for drama purposes etc.) are disallowed.