- Issue created by @kavya n n
- 🇨🇦Canada liquidcms
I see the same on a checkbox widget for a List field.
- also fails validation even when something selected
- First commit to issue fork.
- @malcomio opened merge request.
- 🇬🇧United Kingdom malcomio
I wasn't able to reproduce the issue mentioned in #4, but I think the problem is that the JS adds the "form-required" class to the legend and the span inside it.
This change fixes it for me in a subtheme of adminimal_theme
Probably need to check what happens in different themes - are there some themes where the class should go on the legend?
The default behaviour for a required field seems to be that it's on the span: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/themes/claro/...
Also the logic inside that JS file isn't very clear - would be good to review in more detail.
It was added in this commit for 🐛 If target field is multiple checkbox and condition is required then all checkboxes are being required. Fixed