getgrav / grav-plugin-form

Grav Form Plugin

Home Page:http://getgrav.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single checkbox invalid input on required validation

robhuijben opened this issue · comments

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

  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.