File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
docs/generators/build-structure Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -292,12 +292,18 @@ T.date().inThePast(); // Accept dates that represent a datetime in the past.
292292``` ts
293293T .array ().values (T .bool ());
294294// -> Typescript type: boolean[]
295- // -> Valid validator inputs: true, [false]
295+ // -> Valid validator inputs: [ true] , [false]
296296// -> Validator outputs: [true], [false]
297- // Note the auto conversion to array for the first input.
298297
299298T .array ().min (1 ); // Enforce a minimum number of items
300299T .array ().max (5 ); // Enforce a maximum number of items
300+
301+ T .array ().values (T .bool ()).convert (); // Convert non-array values to an array
302+ // -> Typescript input type: boolean|boolean[]
303+ // -> Typescript output type: boolean[]
304+ // -> Valid validator inputs: true, [false]
305+ // -> Validator outputs: [true], [false]
306+ // Note the auto conversion to array for the first input.
301307```
302308
303309## Object
You can’t perform that action at this time.
0 commit comments