Contact number

The contact number can be a primary method of contact to a user. In many instances, the service may also require the verification of a contact number before the service proceeds.

The method to collect a contact number requires consistency, and must take into account the following parameters:

  • There are various contact numbers a user may provide.
  • There is a need to intelligently detect what is mobile number, and what is not.
  • It is recommended to verify the contact number, if a mobile number, at a profile level.
  • Accepting a contact number must take into account international formats too.

The contact number pattern

When there is a need to collect data from a user about their contact number, it is advisable to allow the user to store various contact touch points in their profile and label them. It is also advisable to allow users to use their stored contact details when applying for a service, and the ability to add a new one.

Verify the number of a user when it is added to the system.

In order to maintain a consistent data collection method, accepting the country code must be seperated from the contact number. Always load the default country code based on the user's location or their profile preference, and do not allow the user to select an empty value in a country dropdown.


Displaying a contact number

When displaying a contact number, always display it with the country code, and add a space between the country code and the number itself.

+971 551234567

If you are storing the value of the contact number as a single field, it is also recommended to use Regular Expressions (RegEx) to determine what is an area code or a mobile number prefix code and display it accordingly. Learn more about using RegEx patters.

Hence, if you are able to use RegEx and sperate the area code, or the mobile number prefix, then you must add an additional space after the code.

+971 55 1234567

While displaying internal format numbers, you may simply use the original method to display a number, which is a space after the country code.

+44 7911123456