FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(checkExact): returns unknown nested fields under a wildcard by fedeci · Pull Request #1281 · express-validator/express-validator · GitHub

fix(checkExact): returns unknown nested fields under a wildcard - #1281

Open
fedeci wants to merge 2 commits into
express-validator:masterfrom
fedeci:fedeci/fix/matched-array-items
Open

fix(checkExact): returns unknown nested fields under a wildcard#1281
fedeci wants to merge 2 commits into
express-validator:masterfrom
fedeci:fedeci/fix/matched-array-items

Conversation

fedeci commented Feb 21, 2024

Copy link
Copy Markdown
Member

Description

Fixes #1242

To-do list

  • I have added tests for what I changed.
  • This pull request is ready to merge.

coveralls commented Feb 21, 2024
edited
Loading

Copy link
Copy Markdown

coverage: 100.0%. remained the same
when pulling 4f59858 on fedeci:fedeci/fix/matched-array-items
into ffd7994 on express-validator:master.

gustavohenke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Smart way of fixing this, but I'd like to discuss a gotcha with this.

A custom validator can validate any aspect of an object/array, which is an undocumented assumption that this PR breaks. It's arguable whether one could still want this behaviour when there's isArray(), isObject(), among others, nowadays.

Should we keep this behaviour?
If yes, we need to mark fields with any user-specified custom validators (which excludes e.g. isArray()/isObject(), implemented using custom()) as being considered known "as a whole", whereas others are "partially" known.

Either way, we need to document it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is checkExact() with wildcards supported?

3 participants


Back | FazBrowse Home | New Git URL