diff --git a/README.md b/README.md index 9dcb81b..ce884ca 100644 --- a/README.md +++ b/README.md @@ -80,26 +80,30 @@ state. ``` -### Checkbox and Radio Fields +### Checkbox and Radio Fields {#checkbox-and-radio-fields} - Wrap all options in a `
` element and add the `form-group` class to it instead of the individual options. - The `` tag may be used to give the option set a heading. -- Each `checkbox` or `radio` `` type should be wrapped in a -`form-group__item` class. This class is not used programattically, and is only -used for styling. +- [Field Options](#field-options) are shared amongst all inputs in a check or +radio group. Your options only need to be applied to one of the inputs in the +group that shares a `name` attribute. ```html
Check Group - + + + + +
``` @@ -407,8 +411,10 @@ or [`input`](https://developer.mozilla.org/en-US/docs/Web/API/Element/input_even > Individual field validation can be disable by setting [`onlyOnSubmit`](#onlyOnSubmit) to true. -## Field Options +## Field Options {#field-options} +* [maxCount](#maxcount) +* [minCount](#mincount) * [optional](#optional) * [pattern](#pattern) * [patternMessage](#patternmessage) @@ -429,6 +435,24 @@ properly formatted JSON object with the properties and values below. ``` +### maxCount (Checkboxes Only) + +**Default:** `null` + +Checkbox groups with the `maxCount` property set to an integer will fail validation +if the number of checked inputs is over this limit. + +> See [here](#checkbox-and-radio-fields) for more information on how to apply options to checkboxes. + +### minCount (Checkboxes Only) + +**Default:** `1` + +Checkbox groups with the `minCount` property set to an integer will fail validation +if the number of checked inputs is under this limit. + +> See [here](#checkbox-and-radio-fields) for more information on how to apply options to checkboxes. + ### optional **Default:** `false` diff --git a/index.html b/index.html index c0592bd..4d2590f 100644 --- a/index.html +++ b/index.html @@ -62,7 +62,7 @@ - +