What's the correct validate config for a checkbox group? #10984
stephenmeehanuk
started this conversation in
General
Replies: 1 comment
-
FYI, I have encountered the same issue and created the corresponding #11062 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I've used
php artisan vendor:publish --tag=statamic-forms
Running into a couple of issues with validation
This is my fieldset config for the form
What's the correct validate config for a checkbox group?
This is the checkboxes partial
if validate|contains:required
uses browser validation on every checkbox in a group. I'd rather not use browser validation as this requires every checkbox to be checked in order for the form to submit. This is only useful for a single checkbox.checkboxes-1.mp4
When I remove
{{ if validate|contains:required }}required{{ /if }}
browser validation is removed, but the Statamic validation doesn't work?checkboxes-2.mp4
I can only get the Statamic validation to work if I remove
<input type="hidden" name="{{ handle }}[]">
checkboxes-3.mp4
I'd like to use the correct code as output by
php artisan vendor:publish --tag=statamic-forms
I think this is an issue with the validation config I've used. Any tips would be great!Beta Was this translation helpful? Give feedback.
All reactions