Duplicate error messages with inline_form_errors

Created on 9 December 2022, over 1 year ago
Updated 31 August 2023, 10 months ago

If inline_form_errors is enabled, when adding a custom validation to the address form element, errors pop on each address fields.
This kind of issue was already referenced for core widgets β†’ as well as for Webform onces β†’ .
An #error_no_message key should be added in a way that error messages shows only once.

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France NicolasGraph Strasbourg

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.

  • πŸ‡ΊπŸ‡ΈUnited States Greg Boggs Portland Oregon

    When I apply this patch, I no longer get any messages at all. Ideally what we want is the ability to set an error message per subfield

    $form_state->setErrorByName('field_mailing_address.zip', t('Error on zip'));

Production build 0.69.0 2024