Entering a telephone number
Use the field type Telephone if you want to receive the input of a telephone number.
Entering a telephone number in the explicitly designated field type Phone is primarily a requirement of Accessibility in the sense of the Web Accessibility Initiative WAI. If a specific type of user input is expected and a corresponding HTML input type exists, this semantically appropriate HTML input type must be used.
Note: The explicit field type Phone has its most important function when using assistive technology for accessibility. Using it immediately makes it clear what type of input is expected.
Validation Overview
Note: All selected validations are always executed. Custom Validation is also executed in addition to all other selected validations. Deselect a specific validation if you do not want it executed.
The Phone field type has several options, especially for validating the spelling of a telephone number:
- No Validation leaves all spelling options open to the user. In this case, no spelling check is performed.
- Custom Validation leaves all spelling options open to the administrator.
- Select one of 5 phone number standards for spelling.
In this case, the spelling check is performed using internal regular expressions. - Admission of additional permitted characters.
The standard checks based on the 5 internal regular expressions are strict.
In addition to the selected strict phone number standard for spelling, any number of optionally selected characters can be included in the phone number.
They are temporarily removed from the phone number for the actual validation of the phone number spelling.
This can facilitate input and support readability by creating blocks.
Note: Empty fields are not validated with regard to the form of the phone number. Empty fields are only recognized by the Required field option.
Custom Validation
The Custom Validation option is selected automatically if the Custom Validation parameter is not empty:
- Field Configuration » Tab: Basic Settings
Group: Validation Settings » Parameter: Custom Validation = ‘Regular Expression for the Phone Number’.
Note: The regular expression may only contain the expression itself and no additional enclosing delimiters, as is common in many programming languages.
Phone Number Standards
Visforms distinguishes between five built-in validations for phone number spellings.
There are four nationally or internationally standardized notations:
- National (Numbers Only)
- 123456
- 01234123456
- 0178123456
- International Telecommunication Union (ITU-T)
- +3012345678
- Germany International (DIN 5008)
- National: 030 12345-67
- International: +49 30 12345-67
- North American Numbering Plan (NANP)
- 123 456-789
- Extensible Provisioning Protocol (EPP)
- +49.3012345×67

National Number Standards
National number standards apply to a more or less large region. The region can include multiple countries. National number standards are not internationally recognized and are specific to use within the region. National number standards also specify the spelling of a telephone number for international calls outside the region.
National (Numbers Only)
The National (Numbers Only) phone number notation is not a recognized standard in the true sense of the word. This built-in optional validation represents a simple check for digits. In many simple cases, this requirement is sufficient and desired.
In addition, the National (Numbers Only) phone number notation, together with the Additionally Allowed Characters parameter, offers the possibility of quickly and easily achieving a generally appropriate and not overly strict validation. Users usually know exactly what information they need to provide for a phone number that can be understood and called. In these situations, the effort required to ensure the correct notation, which is accepted by strict validation, can actually be a deterrent for users.
The National (Numbers Only) setting, along with the permitted additional characters ‘space’, ‘brackets’, ‘plus’, and ‘minus’, allows the user to enter the following notations:
- +49 (30) 12345-67
This notation corresponds to Microsoft’s canonical address format (TAPI). - 049 (30) 110 45 46
The free formation of digit blocks is possible. Digit blocks can be specific to a particular phone number to support an easier-to-read and memorable notation with matching digit blocks. - 049301234567
A purely technical representation using only digits is also possible if the user prefers this input.
Germany International (DIN 5008)
In Germany, the standard DIN 5008 is authoritative.
The standard DIN 5008 provides writing and layout rules for text and information processing. It is one of the fundamental standards for office and administrative work. The standard is currently being developed by the national DIN committee, the Standards Committee for Information Technology and Applications (NIA).
In addition to specifying the spelling of telephone numbers, the standard DIN 5008 also provides spelling and formatting rules for:
- Abbreviations,
- Emphasis,
- Letter forms and templates,
- Letter layout,
- Date formatting.
National telephone numbers contain an area code and are represented as follows:
- 030 12345-67
Function-related separation by a space, extension separated by a hyphen.
International telephone numbers contain a country code and area code and are represented as follows:
- +49 30 12345-67
Function-related separation by a space, extension separated by a hyphen.
North American Numbering Plan (NANP)
The North American Numbering Plan (NANP) is an integrated telephone numbering plan for 25 regions in 20 countries, primarily in North America and the Caribbean. This group is historically known as World Numbering Zone 1 and has the country code 1.
Some North American countries do not participate in NANP, notably Mexico. The United States and Canada do, however.
The NANP numbering format is summarized in the ten-digit notation NXX NXX-XXXX, where N represents any digit between 2 and 9 and X represents any digit between 0 and 9. A NANP-compliant telephone number consists of the following three parts:
- The first NXX block is the numbering plan area code (NPA).
- The second NXX block is the central office area code.
- The third XXXX block is the line number, a unique four-digit number for each NPA.
Note: The minus sign - is always placed directly between the second and third digit blocks in a telephone number notation that complies with NANP.
Note: The minus sign - must not be selected as an additional permitted character when using this format.
The following number, for example, is a valid telephone number with the area code 234, the exchange code 235, and the line number 5678:
- 234 235-5678
International Numbering Standards
International Telecommunication Union (ITU-T)
E.164 is an international standard with an ITU-T recommendation and is titled ‘International Public Telecommunication Numbering Plan’. E.164 specifies a numbering plan and a telephone number notation for the worldwide public telephone network and some other data networks.
E.164 specifies the components of a telephone number and the permitted number of digits. In particular, the international area codes are specified, such as 41 for Switzerland, 43 for Austria, 49 for Germany, and 1 for the entire North American Numbering Plan (NANP).
E.164 defines a common format for international telephone numbers. Plan-compliant telephone numbers are limited to digits and a maximum of fifteen digits. The specification divides the digit sequence as follows:
- A one- to three-digit country code.
- A maximum of twelve digits.
Note: The plus sign + is always the first character in a telephone number notation that complies with ITU-T.
Note: The plus sign + must not be selected as an additional allowed character when selecting this format.
For example, the following telephone number is a valid telephone number with the international dialing code for Germany 49, the area code 1678, and the line number 12345678:
- +49167812345678
For example, the following number is a valid telephone number with the international dialing code for the North American Numbering Plan 1, the numbering plan code 234, the central office code 235, and the line number 5678:
- +12342355678
Extensible Provisioning Protocol (EPP)
The Extensible Provisioning Protocol (EPP) is a flexible network protocol for creating objects in the registration databases of the Network Information Center (NIC). The Network Information Center (NIC) is used, for example, for domain registration and domain transfer.
The Extensible Provisioning Protocol (EPP) is described in the Request for Comments (RFC) RFC 5733. RFC 5733 is derived from E.164, the international recommendation of the International Telecommunication Union (ITU-T).
The following phone number, for example, is a valid phone number with the international dialing code for Germany 49, the area code 30, and the line number 12345 with a detached extension 67:
- +49.3012345×67
Additional permitted characters
The selected phone number standard for a phone number notation is expanded to include additional permitted characters. This can simplify entry and support readability by forming blocks. The characters selected here may be included in any number in the phone number and are temporarily removed from the phone number for the actual validation of the phone number notation.
Note: If a character is an integral part of the selected phone number standard, this character must not be selected as an additional permitted character.
Examples for the phone number standard ITU-T:
- Standard plus spaces are permitted, for example:
+49 1578 123 456. - Standard plus spaces and round brackets and minus allow, for example:
+49 (30) 12345 - 67.
The notation corresponds to the Microsoft Canonical Address Format TAPI.

Special Features
The following non-critical situations can occur when the parameters from the Validation Settings group interact.
Mandatory Field Validation
Assume an option is selected in the Phone Number Standard parameter and a selection is made in the Additionally allowed characters parameter. In addition, the Mandatory Field parameter is set.
In this case, the user can only enter additional permitted characters and, in particular, cannot enter numbers.
Since the telephone field does not appear empty, it passes the early mandatory field check, and the form can at least be submitted for the time being. After submitting the form in the backend during the late mandatory field check, a validation error occurs during the mandatory field check. The form is then returned with the corresponding validation error message and redisplayed with the old data along with the error message.
Enforce Unique Values
Depending on the configuration of the validation settings, there may be multiple permitted spellings for a phone number. Multiple permitted spellings are possible, especially if a selection is made in the Additionally Allowed Characters parameter. In this case, the user has the option of freely customizing the spelling using the additional permitted characters, in addition to the strict validation of the phone number.
Validation in the sense of the Enforce Unique Values parameter no longer works as expected in these cases of ambiguous spelling. In addition to the actually important and decisive digits, there may be additional characters distributed arbitrarily. Visforms saves the phone number specified by the user unchanged in the field of the data table.
Note: If validation in the sense of the Enforce Unique Values parameter is important for the form, the spelling validation must be configured as strictly as possible. Validating the spelling with a selection in the Additionally Allowed Characters parameter is counterproductive.
Note: Validating the spelling with the two telephone number standards International Telecommunication Union (ITU-T) and North American Numbering Plan (NANP) without a selection in the Additionally Allowed Characters parameter is very strict and is particularly suitable in conjunction with validation in the sense of the Force Unique Values parameter.
Validation error messages
In the validation error messages, the additional characters allowed and used according to the selection in the Allowance of additional permitted characters parameter are not included in the displayed field value. The error message shows the phone number entered in the phone field without any additional permitted characters. However, an addition at the end of the error message lists all possible additional permitted characters, according to the selection in the Allowance of additional permitted characters parameter.