Skip to content

Checkbox Group - Validation Not Working #591

Open
@chris-scholl

Description

@chris-scholl

I have submitted this previously (#582) but it was closed due to some issues with my examples. Hopefully you can help with this issue.

When validating a checkbox group the documentation reads:
Validate qty of checkboxes in a group (same name) have been checked, using min, max or range. Only the first checkbox element in the group needs to have the validation attributes added.

If the validation attributes are not on ALL checkboxes the validation fails.

Here is an example of the behavior, the validation works when checking and unchecking the first checkbox. When you try to check and uncheck any other checkbox in the group, the validation does not occur.

http://codepen.io/chris-scholl/pen/eWmOpg

I was adding the validation attributes to all checkboxes as a work-around but this causes the form to slow down and lock up the browser for 5-30 seconds at a time.

The main issue is that the validation only occurs on the checkbox array when the first checkbox is checked or unchecked.

One example is this:

  • check the first checkbox
  • check the second checkbox
  • uncheck the first checkbox
  • unchecking the second checkbox does not appear to remove the valid (green) state on the checkbox array

Another example is just checking any box other than the first, nothing appears to happen.

Thank you for taking the time to look into this issue.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions