You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the required attribute on a set of checkboxes with the same name, does not work the same way as using the required attribute on a set of radio buttons with the same name. For radio buttons, you can mark any one or all related radio buttons as required and the form will by default validate if any one of those radio buttons is checked. For checkboxes, you have to mark every checkbox field as required and it actually sets every individual checkbox as required (not a single checkbox in a grouped set of checkboxes with the same name).
What is the expected behavior?
Checkboxes should validate the same way that radio buttons do. If the user checks any one or more checkboxes in a related set of checkboxes, the form should validate.
If this issue is a question or feature request, what is the motivation / use case for changing the current behavior?
The use case here is to get checkbox questions to validate properly. So people filling out a survey aren't required to check every single checkbox in a given set.
Other information (detailed explanation, stacktraces, related issues, suggestions on how to fix, links for context, eg. StackOverflow, Gitter, etc)
This issue stems from the default nature of checkbox input elements and how the required attribute works on them. This issue will require some validation JavaScript to be exported in any form that contains a checkbox question that is marked as required.
The text was updated successfully, but these errors were encountered:
What is the current behavior?
Using the required attribute on a set of checkboxes with the same name, does not work the same way as using the required attribute on a set of radio buttons with the same name. For radio buttons, you can mark any one or all related radio buttons as required and the form will by default validate if any one of those radio buttons is checked. For checkboxes, you have to mark every checkbox field as required and it actually sets every individual checkbox as required (not a single checkbox in a grouped set of checkboxes with the same name).
What is the expected behavior?
Checkboxes should validate the same way that radio buttons do. If the user checks any one or more checkboxes in a related set of checkboxes, the form should validate.
If this issue is a question or feature request, what is the motivation / use case for changing the current behavior?
The use case here is to get checkbox questions to validate properly. So people filling out a survey aren't required to check every single checkbox in a given set.
Other information (detailed explanation, stacktraces, related issues, suggestions on how to fix, links for context, eg. StackOverflow, Gitter, etc)
This issue stems from the default nature of checkbox input elements and how the required attribute works on them. This issue will require some validation JavaScript to be exported in any form that contains a checkbox question that is marked as required.
The text was updated successfully, but these errors were encountered: