Method Standards.JSON.Validator()->validate_array()
- Method
validate_array
private
string
|zero
validate_array(string
key
,mixed
value
,mapping
(string
:mixed
)schema
)- Description
Verify that the specified value is an array according to the specified schema. The following properties of schema are verified:
- minItems
If schema has the property "minItems", then the array must have at least the specified number of items.
- maxItems
If schema has the property "maxItems", then the array must not have more than the specified number of items.
- items
If schema has the property "items", which is an array of schema objects, then each element in the value array must be valid according the corresponding schema in the "items" array.