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): avoid passing validateModifiedOnly to subdocs so subdocs get fully validating if they're directly modified #14685

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

vkarpov15
Copy link
Collaborator

Fix #14677

Summary

Right now we propagate validateModifiedOnly to subdocument validate(), which causes problems when a subdocument is directly modified. If you overwrite the full subdocument, we should validate the whole subdocument, not just the subdocs modified paths.

Examples

…cs get fully validating if they're directly modified

Fix #14677
Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

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

Looks good to me, aside from the lint errors.

@vkarpov15 vkarpov15 merged commit c062b1f into master Jun 25, 2024
46 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-14677 branch June 25, 2024 17:10
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.

Document.prototype.validate() does not validate subdocument required fields with validateModifiedOnly option
2 participants