aarongustafson / form-required-checkboxes

Web component that enables requirement rules for checkbox groups
MIT License
4 stars 0 forks source link

Required Checkboxes Web Component

Currently, we can only make checkboxes required or not, individually. In some cases you need to be able to set a specific number of checkboxes that need to be checked. The form-required-checkboxes web component enables that.

API

Markup Assumptions

This web component assumes you will be marking up your checkbox group in a fieldset with a legend and that all of the checkboxes share a name (e.g., "foo[]").

Demo

Live Demo (Source)