Skip to main content

How does phone number validation work (on interactive registration sites)?

Updated yesterday

Validation rules are applied to all phone number fields except “Other Number,” (for example to only allow specific characters and numbers, along with dropdown options for mobile numbers) to help ensure correctly formatted numbers are entered on a registration site.

The "Other Number" field can be used if characters are required, for example to add "XTN" for an extension.

  • Phone number validation will result in an error message if a phone number doesn't meet the following criteria:

    • Minimum and maximum character lengths

    • No characters except dashes, spaces and + at the beginning of the number.
      ​You can configure an extra setting in the Mobile Phone field to enforce your preferred international format (this is off by default). See below for more information.

  • You can customize the error messages in the Localization tab of the interactive site. [The default error message is "Invalid phone number format for <field name>”.]

  • Site visitors returning via auto-login token will be prompted to update their phone numbers if needed, if validation was switched on after their initial data entry.

Extra settings - Mobile Phone field

To enforce specific international formats on the Mobile Phone field, go to the interactive site builder, ensure Mobile Phone (Contact component) is included in your site, and go to settings.

Check the box for “Enforce international phone format validation” which is unchecked (off) by default.

IMPORTANT: If you check this box, you must leave blank the fields for Dropdown Values and Default Value.

The site visitor will now see this on the field:

They can search for and select their country to apply the correct international code at the start of the number.

After selecting a country, the field will show the site user an example number (in gray) in the correct local format (i.e. in the way they're used to writing it, without the international extension at the beginning).

The user can enter their number:

On the contact record, this is converted to the full number (with international code at the beginning).


Did this answer your question?