Problem/Motivation

inline_form_errors module is part of Drupal 10.x core. It allows us to have form validation errors displayed in the Bootstrap custom style. However, the current radix list-group component implementation isn't compatible with the summary of the form elements containing invalid values (provided by inline_form_errors), which is printed either at the top of the content region or at the top of the form itself (when the AJAX form submission is used.

After submission of form containing invalid values, following exception is logged:

Drupal\sdc\Exception\InvalidComponentException: [list_group_items[0].value] Object value found, but a string is required/n[list_group_items[1].value] Object value found, but a string is required/n[list_group_items[2].value] Object value found, but a string is required in Drupal\sdc\Component\ComponentValidator->validateProps() (line 205 of /app/web/core/modules/sdc/src/Component/ComponentValidator.php).

Steps to reproduce

  • install current version of the webform module
  • create a webform containing a required form element
  • display the webform using the sub-theme of radix
  • submit the webform without filling-in the required element

Proposed resolution

Accept both string and object as value of list_group_items[n].value

Issue fork radix-3462925

Command icon 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

milos.kroulik created an issue. See original summary.

milos.kroulik’s picture

Status: Active » Needs review

I've created a simple patch fixing the issue for me.

doxigo made their first commit to this issue’s fork.

  • doxigo committed 0b4c9f0e on 6.0.x authored by milos.kroulik
    Issue #3462925 by milos.kroulik: list-group component is not compatible...
doxigo’s picture

Status: Needs review » Fixed

Lovely, as always thanks Miloš

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.