Validation error when refreshing form

Created on 9 September 2025, 9 days ago

Problem/Motivation

When saving an international phone field, the value is saved in international format, which is ok.

"field_int_phone" => array:1 [▼
      "x-default" => array:1 [▼
        0 => array:1 [▼
          "value" => "+33612345678"
        ]
      ]
    ]

But when displaying again the form with the following field widget settings:

field_int_phone:
    type: phone_international_widget
    weight: 8
    region: content
    settings:
      geolocation: true
      initial_country: FR
      exclude_countries: {  }
      preferred_countries:
        - PT
      countries: exclude
      dial_code: true
      auto_placeholder: polite
      national_number: false
    third_party_settings: {  }

when saving without doing any change, the problem is that the saved value is without the international prefix, so there is a validation error, see screenshot.

Proposed resolution

check JS to ensure that prefix is properly re-set in the submitted value

Remaining tasks

User interface changes

None

API changes

Data model changes

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇫🇷France Grimreaper France 🇫🇷

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024