Skip to content

Consistent seq behaviour in :validate - #1289

Open
irigarae wants to merge 2 commits into
metosin:masterfrom
irigarae:experimental-validate-consistent-seq-behaviour
Open

Consistent seq behaviour in :validate#1289
irigarae wants to merge 2 commits into
metosin:masterfrom
irigarae:experimental-validate-consistent-seq-behaviour

Conversation

@irigarae

Copy link
Copy Markdown

With the current behaviour, returning an empty list of errors gives false in m/validate but nil in m/explain. This PR brings consistency.

And separate (off) topic, but the test also shows that :type is returned as nil in the explain :errors, even if not provided. Not sure if this is consistent with other parts of the codebase where it's often not present, or if it was intentional to make it mandatory in this schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants