Single checkbox invalid input on required validation
robhuijben opened this issue · comments
Rob Huijben commented
Problem
When a form contains a single checkbox with required validation, the server side validation returns an 'invalid input' message and the form cannot be submitted.
Steps to reproduce
- Clean install Grav CMS 1.7.27.1
- Create form with the example contact form code
- Add terms of agreements checkbox code
type: checkbox
label: "Agree to the terms and conditions"
validate:
required: true
- Fill in the form in the frontend, check the agreements checkbox
- Validation never passes and message 'Invalid input in Agree to the terms and conditions' is displayed
Expected result
Validation should pass when checkbox is checked and form should be submitted.