Telephone Number
This pattern was last updated 18/09/2020, this is version 1.2
Stable
Pattern created
17/01/2020.
Description
A telephone number is a sequence of digits used to connect to a fixed line or wireless device.
Telephone numbers should only be collected and stored if there is a genuine need.
Telephone numbers should not be split into geographical and subscriber numbers as there is little benefit.
Field formats, data types, and patterns
Telephone number should be stored as a string entry in a single field, in order to preserve leading zeros and potential special characters used for international dialling codes and formatting (eg +, (), -).
A field length of 20 would allow for the following examples plus other international variants and spaces (guidelines within E.146 - International Telephone Formats would restrict to 15 characters for international numbers, 3 for country code and 12 for subscriber number, with all spaces and special characters removed (excluding ‘+’ symbol for country code)).
01xxx xxxxxx
01xx xxx xxxx
020 xxxx xxxx
01xx xx xxxxx
+44 xxxx xxxx xxxx
Notes
FSA use telephone numbers primarily to send alerts using the gov.uk Notify service. Please see the relevant API documentation available through the reference below.
SQL snippet
CREATE TABLE IF NOT EXISTS Telephone_number (
Telephone_number VARCHAR(20)
);
References
- International standards for telephone number formats
- International guidelines for presentation of telephone numbers
- UK telephone numbers
- International Trunk Prefix
- Gov.UK.Notify service
- Formatting international numbers using E.164
Further reading
- GDS guidance re telephone numbers (currently experimental), this includes information on validation of telephone numbers
- Guidance regarding autocompletion of fields
- MojoLingo - Handling Phone Numbers: Best Practices for Developers
- What data type would you use to store a phone number