> For the complete documentation index, see [llms.txt](https://racoon-js.gitbook.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://racoon-js.gitbook.io/en/api/array/min.md).

# min

min(limit, \[closed=true])

## Effect

Restrict the min length of the detected array.

## Arguments

* `limit` ***(number)***  - The min length.
* `[closed]` ***(boolean)*** - Whether it is a closed interval or not, the default is`true`, which means a closed interval, it requires the detected array's length greater than or equal to `limit`. If you exactly set `closed` to `false`, you'll get an opened interval, it requires the detected array's length strictly greater than `limit`.

## Example

```javascript
const schema = racoon.array(racoon.number()).min(3);
schema.validate([1, 2]); // fail
schema.validate([1, 2, 3]); // pass
schema.validate([1, 2, 3, 4]); // pass

const schema2 = racoon.array(racoon.number()).min(3, false);
schema2.validate([1, 2]); // fail
schema2.validate([1, 2, 3]); // fail
schema2.validate([1, 2, 3, 4]); // pass
```
