Allow multiple "Countries" for valid country when using National format

Created on 5 May 2023, almost 2 years ago
Updated 26 May 2023, almost 2 years ago

Problem/Motivation

We have a webform where multiple territories that are part of the US and all use the +1 prefix need to be allowed in a phone number field. When using the National format validation, you can only select one country and submitted numbers don't need to include any prefix. When using the E164 formation validation, you can select multiple countries but numbers are required to include the prefix.

It would be easier for form submitters to not have to include the prefix when submitting the form, while still having some phone number format validation.

Steps to reproduce

  1. Add a telephone field (not "telephone advanced") to a webform. Configure to use "National" under "Valid format" and "United States - +1" under "Valid country".
  2. Try submitting the form using a telephone number from Puerto Rico (787-867-5309) or US Virgin Islands (340-423-5309)
  3. See validation error for telephone field.

Proposed resolution

Allow multiple countries to be selected when using the national formation validation while not requiring the prefix to be entered.

Alternative

If using the E164 format validation and all countries selected use the same prefix, don't require the prefix to be entered.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Closed: won't fix

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States timwood Rockville, Maryland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024