Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validation for checkboxes rendered with accompanying hidden input. #51

Merged
merged 3 commits into from
Jul 3, 2023

Conversation

haacked
Copy link
Owner

@haacked haacked commented Jul 3, 2023

Browsers do not send a value for unchecked checkboxes. To work around this, platforms such as ASP.NET render a hidden input with the same name as the checkbox so that a value ("false") is still submitted even when the checkbox is not checked. We check this special case here.

Fixes #48

Browsers do not send a value for unchecked checkboxes. To work around this, platforms such as ASP.NET render a hidden input with the same name as the checkbox so that a value ("false") is still submitted even when the checkbox is not checked. We check this special case here.

Fixes #48
To help validate it works correctly.
@haacked haacked force-pushed the haacked/48-required-validation-on-optional-checkboxes branch from 831730d to 11c70b6 Compare July 3, 2023 17:07
@haacked haacked merged commit 17f8a79 into main Jul 3, 2023
1 check passed
@haacked haacked deleted the haacked/48-required-validation-on-optional-checkboxes branch July 3, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Required" validation on optional checkboxes
1 participant