Use validation functions from the libphonenumber library

Created on 24 July 2023, over 1 year ago
Updated 24 August 2023, over 1 year ago

Problem/Motivation

\Drupal\phone_number\Plugin\Validation\Constraint\PhoneNumberValidator::validate does not validate phone numbers, although the library does offer this functionality.

It does call \libphonenumber\PhoneNumberUtil::format to check the format, but ideally it would also use \libphonenumber\PhoneNumberUtil::isValidNumber to validate the number for the country.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

โœจ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom malcomio

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

Comments & Activities

Production build 0.71.5 2024