Can not save a mask with only the number 0

Created on 21 January 2023, over 1 year ago
Updated 8 July 2024, 2 months ago

Problem/Motivation

When trying to save a mask with only the number 0, the mask is not saved at the form display.

Steps to reproduce

Go to the form display of a content type
Try setting a mask with only the number 0

Proposed resolution

Allow to save a mask with only the number 0

Remaining tasks

Create patch
Review patch

User interface changes

-

API changes

-

Data model changes

-

🐛 Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

🇧🇪Belgium tim-diels Belgium 🇧🇪

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Assigned to cgoffin
  • @cgoffin opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review 11 months ago
  • Assigned to dtfabio
  • Status changed to Active 2 months ago
  • 🇧🇪Belgium dtfabio Ninove

    Hi cgoffin,

    I will test out your changes from the MR.

    Greetings,

    Fabio

  • Issue was unassigned.
  • Status changed to RTBC 2 months ago
  • 🇧🇪Belgium dtfabio Ninove

    I tested the change on two standard Drupal instances, a D10 and D9 version because the module is supported for these versions.

    I tried the change for both the text field, and the telephone number field. Works correctly for both, and for completeness I also tried all combinations of options (e.g. combining operators, reverse order, etc).

    Just to try and rule out regression issues, everything still worked for as far that I could tell.

    The only part I wasn't sure about is the "Select on focus" checkbox, I don't quite understand what the desired behaviour should be?

    D10 instance specifications:

    Drupal version = 10.3.1
    PHP version = 8.2.20

    D9 instance specifications:
    Drupal version = 9.5.11
    PHP version = 8.1.29

Production build 0.71.5 2024