minItems - sgpinkus/json-schema GitHub Wiki
THIS WIKI IS OBSOLETE. PLEASE SEE THE NEW JSON-SCHEMA-ORG/JSON-SCHEMA-SPEC REPOSITORY.
An array instance is valid with regards to this keyword if and only if its number of elements is greater than, or equal to, this keyword's value.
The value of minItems MUST be an integer. This integer MUST be greater than, or equal to, 0.
Given this schema:
{
"minItems": 3
}
the following instances are valid:
- [ 1, 2, 3, 4 ];
- [ 1, 2, 3 ];
the following instances are invalid:
- [ "no", "dice" ];
- [ { "a": "b", "c": "d", "x": true }, [ 1, 2, 3, 4, 5 ] ].