Skip to content

Commit 40669d8

Browse files
committed
Clarify that "length" applies to objects as well as arrays
1 parent 408ec65 commit 40669d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jsonschema-validation.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@
418418
<xref target="json-schema">"contains"</xref> keyword. The first way is if
419419
the annotation result is an array and the length of that array is less than
420420
or equal to the "maxContains" value. The second way is if the annotation
421-
result is a boolean "true" and the instance length is less than or equal to
422-
the "maxContains" value.
421+
result is a boolean "true" and the instance length (number of items or
422+
properties) is less than or equal to the "maxContains" value.
423423
</t>
424424
</section>
425425

@@ -437,8 +437,8 @@
437437
<xref target="json-schema">"contains"</xref> keyword. The first way is if
438438
the annotation result is an array and the length of that array is greater
439439
than or equal to the "minContains" value. The second way is if the
440-
annotation result is a boolean "true" and the instance length is greater
441-
than or equal to the "minContains" value.
440+
annotation result is a boolean "true" and the instance length (number of
441+
items or properties) is greater than or equal to the "minContains" value.
442442
</t>
443443
<t>
444444
A value of 0 is allowed, but is only useful for setting a range

0 commit comments

Comments
 (0)