Repository navigation
Admin: Require one item in all required arrays - #698
Merged
Merged
Conversation
lehni
enabled auto-merge (rebase)
October 25, 2026 00:10
lehni
disabled auto-merge
October 25, 2026 00:16
lehni
force-pushed
the
fix/required-array-properties
branch
from
October 25, 2026 00:24
94a1af3 to
8fa9314
Compare
lehni
enabled auto-merge (rebase)
October 25, 2026 00:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
requiredneeds one item in all array values, as in lists and fields with multiple values: also in written array properties and in fields of custom types whose property istype: 'array'.minItemsoverrides it, e.g.minItems: 0accepts none as an answer.The rule lives in one place,
PropertyNode.getValidationErrors(), for written and field-derived nodes alike. The field-side derivations (minItems: 1ingetDataKeywords(), the callback block increateFieldPropertyNode(), theminItemsfallback inmergePropertyNodes()) are removed, sogetFormProperties()no longer putsminItems: 1into the properties it describes: the server keeps accepting[]forrequired, documented as an admin-only rule in tests/admin/properties.test.js.