Test an array to have a minimum length. @param length - The minimum length of the array.
(length: number)
| 31 | @param length - The minimum length of the array. |
| 32 | */ |
| 33 | minLength(length: number): this { |
| 34 | return this.addValidator({ |
| 35 | message: (value, label) => `Expected ${label} to have a minimum length of \`${length}\`, got \`${value.length}\``, |
| 36 | validator: value => value.length >= length, |
| 37 | negatedMessage: (value, label) => `Expected ${label} to have a maximum length of \`${length - 1}\`, got \`${value.length}\``, |
| 38 | }); |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | Test an array to have a maximum length. |
no test coverage detected