File tree Expand file tree Collapse file tree 1 file changed +37
-33
lines changed
Expand file tree Collapse file tree 1 file changed +37
-33
lines changed Original file line number Diff line number Diff line change @@ -39,39 +39,43 @@ export interface RuleAny extends RuleCustom {
3939 * @see https://github.com/icebob/fastest-validator#array
4040 */
4141export interface RuleArray < T = any > extends RuleCustom {
42- /**
43- * Name of built-in validator
44- */
45- type : "array" ;
46- /**
47- * If true, the validator accepts an empty array [].
48- * @default true
49- */
50- empty ?: boolean ;
51- /**
52- * Minimum count of elements
53- */
54- min ?: number ;
55- /**
56- * Maximum count of elements
57- */
58- max ?: number ;
59- /**
60- * Fixed count of elements
61- */
62- length ?: number ;
63- /**
64- * The array must contain this element too
65- */
66- contains ?: T | T [ ] ;
67- /**
68- * Every element must be an element of the enum array
69- */
70- enum ?: T [ ] ;
71- /**
72- * Validation rules that should be applied to each element of array
73- */
74- items ?: ValidationRule ;
42+ /**
43+ * Name of built-in validator
44+ */
45+ type : "array" ;
46+ /**
47+ * If true, the validator accepts an empty array [].
48+ * @default true
49+ */
50+ empty ?: boolean ;
51+ /**
52+ * Minimum count of elements
53+ */
54+ min ?: number ;
55+ /**
56+ * Maximum count of elements
57+ */
58+ max ?: number ;
59+ /**
60+ * Fixed count of elements
61+ */
62+ length ?: number ;
63+ /**
64+ * The array must contain this element too
65+ */
66+ contains ?: T | T [ ] ;
67+ /**
68+ * Every element must be an element of the enum array
69+ */
70+ enum ?: T [ ] ;
71+ /**
72+ * Validation rules that should be applied to each element of array
73+ */
74+ items ?: ValidationRule ;
75+ /**
76+ * The array must be unique (array of objects is always unique).
77+ */
78+ unique ?: boolean ;
7579}
7680
7781/**
You can’t perform that action at this time.
0 commit comments