You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pat/validation/documentation.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ These extra validation rules are:
20
20
21
21
- Equality checking between two fields (e.g. password confirmation).
22
22
- Date and datetime validation for before and after a given date or another input field.
23
+
- Minimum and maximum number of checked, selected or filled-out fields. Most useful for checkboxes, but also works for text-inputs, selects and other form elements.
23
24
24
25
25
26
### HTML form validation framework integration.
@@ -146,7 +147,11 @@ More information on the `form` attribute can be found at [MDN](https://developer
146
147
| message-number | The error message for numbers. | This value must be a number. | String |
147
148
| message-required | The error message for required fields. | This field is required. | String |
148
149
| message-equality | The error message for fields required to be equal | is not equal to %{attribute} | String |
150
+
| message-min-values | The error message when the minimim number of checked, selected or filled-out fields has not been reached. | You need to select at least %{count} item(s). | String |
151
+
| message-max-values | The error message when the maximum number of checked, selected or filled-out fields has not been reached. | You need to select at most %{count} item(s). | String |
149
152
| equality | Field-specific extra rule. The name of another input this input should equal to (useful for password confirmation). || String |
150
153
| not-after | Field-specific extra rule. A lower time limit restriction for date and datetime fields. || CSS Selector or a ISO8601 date string. |
151
154
| not-before | Field-specific extra rule. An upper time limit restriction for date and datetime fields. || CSS Selector or a ISO8601 date string. |
155
+
| min-values | Minimum number of checked, selected or filled out form elements. | null | Integer (or null) |
156
+
| max-values | Maximum number of checked, selected or filled out form elements. | null | Integer (or null) |
152
157
| delay | Time in milliseconds before validation starts to avoid validating while typing. | 100 | Integer |
0 commit comments