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
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
Comment #3
milos.kroulik commentedI've created a simple patch fixing the issue for me.
Comment #6
doxigo commentedLovely, as always thanks Miloš