We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbd0e11 commit a63a613Copy full SHA for a63a613
1 file changed
README.md
@@ -192,6 +192,24 @@ If type is `array`, there has four addition rule:
192
193
- `itemType` - The type of every item in this array.
194
- `rule` - An object that validate the items of the array. Only work with `itemType`.
195
+ ```js
196
+ /**
197
+ * check array
198
+ * {
199
+ * type: 'array',
200
+ * itemType: 'string'
201
+ * rule: {type: 'string', allowEmpty: true}
202
+ * }
203
+ *
204
205
+ * type: 'array'.
206
+ * itemType: 'object',
207
+ * rule: {
208
+ * name: 'string'
209
210
211
+ */
212
+ ```
213
- `max` - The maximum length of the array.
214
- `min` - The minimum lenght of the array.
215
0 commit comments