|
203 | 203 | All of the keywords in the <xref target="general">general</xref>,
|
204 | 204 | <xref target="numeric">numeric</xref>, and <xref target="string">string</xref>
|
205 | 205 | sections are assertions, as well as "minItems", "maxItems", "uniqueItems",
|
| 206 | + "minContains", "maxContains", |
206 | 207 | "minProperties", "maxProperties", and "required". Additionally, "dependencies"
|
207 | 208 | is shorthand for a combination of conditional and assertion keywords.
|
208 | 209 | </t>
|
|
585 | 586 | its elements is valid against the given schema.
|
586 | 587 | </t>
|
587 | 588 | </section>
|
| 589 | + |
| 590 | + <section title="maxContains"> |
| 591 | + <t> |
| 592 | + The value of this keyword MUST be a non-negative integer. |
| 593 | + </t> |
| 594 | + <t> |
| 595 | + An array instance is valid against "maxContains" if the number of |
| 596 | + elements that are valid against the schema for "contains" is |
| 597 | + less than, or equal to, the value of this keyword. |
| 598 | + </t> |
| 599 | + <t> |
| 600 | + If "contains" is not present within the same schema object, |
| 601 | + then this keyword has no effect. |
| 602 | + </t> |
| 603 | + </section> |
| 604 | + |
| 605 | + <section title="minContains"> |
| 606 | + <t> |
| 607 | + The value of this keyword MUST be a non-negative integer. |
| 608 | + </t> |
| 609 | + <t> |
| 610 | + An array instance is valid against "minContains" if the number of |
| 611 | + elements that are valid against the schema for "contains" is |
| 612 | + greater than, or equal to, the value of this keyword. |
| 613 | + </t> |
| 614 | + <t> |
| 615 | + A value of 0 is allowed, but is only useful for setting a range |
| 616 | + of occurrences from 0 to the value of "maxContains". A value of |
| 617 | + 0 with no "maxContains" causes "contains" to always pass validation. |
| 618 | + </t> |
| 619 | + <t> |
| 620 | + If "contains" is not present within the same schema object, |
| 621 | + then this keyword has no effect. |
| 622 | + </t> |
| 623 | + <t> |
| 624 | + Omitting this keyword has the same behavior as a value of 1. |
| 625 | + </t> |
| 626 | + </section> |
588 | 627 | </section>
|
589 | 628 |
|
590 | 629 | <section title="Validation Keywords for Objects">
|
|
0 commit comments