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

docs(validation): add section on global schematype validation, clean up other issues #12466

Merged
merged 3 commits into from Sep 25, 2022

Conversation

vkarpov15
Copy link
Collaborator

Fix #12430

Summary

Some improvements to validation docs. First, add a section highlighting that you can use global schematype configuration to set SchemaType-level validation logic, like adding validation for all number paths or all string paths. I also took some time to add a table of contents and prune some unnecessary details: the context option is no longer supported in Mongoose 6, and no need to specify which versions of Mongoose 4 support $pull validation because Mongoose 4 is no longer supported.

Examples

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.

LGTM (aside what was already pointed out)

@hasezoey hasezoey added the docs This issue is due to a mistake or omission in the mongoosejs.com documentation label Sep 23, 2022
Copy link
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

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

One minor comment, otherwise LGTM. Thanks! 👍

Co-authored-by: Hafez <a.hafez852@gmail.com>
@vkarpov15 vkarpov15 merged commit f50ec33 into master Sep 25, 2022
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-12430 branch September 25, 2022 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add SchemaType-level validation to validation docs
3 participants