Problem/Motivation
The telephone subfield widget has an optional format selector field to apply a telephone validation pattern but currently the list of available formats is hardcoded in the TelephoneType::getTelephoneFormats() function. There is currently no simple way for users to add additional formats for other countries.
Steps to reproduce
Add a telephone subfield type and acknowledge the limited format list in the field settings.
Proposed resolution
Similar to the tag manager and link attributes manager, we can provide a .yaml file that stores these default patterns and introduce a plugin manager to creates this list. This would allow developers to override this file with their own custom patterns if desired.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork custom_field-3569263
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments