Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(document): call required functions on subdocuments underneath nested paths with correct context #14801

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

vkarpov15
Copy link
Collaborator

Fix #14788

Summary

When we add all paths underneath a nested path to list of paths to validate, we actually need to avoid adding paths underneath single nested subdocuments. That's because validating a single nested subdoc triggers validation on all paths underneath that subdoc.

Examples

@vkarpov15 vkarpov15 merged commit 9742d5a into master Aug 13, 2024
46 checks passed
@vkarpov15 vkarpov15 added this to the 8.5.3 milestone Aug 13, 2024
@hasezoey hasezoey deleted the vkarpov15/gh-14788 branch August 13, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

this context in nested schema required functions changed since mongoose 7.0.2+
2 participants