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 validateBeforeSave and invalidate #9144

Merged
merged 1 commit into from
Jun 18, 2020
Merged

docs(validation): add validateBeforeSave and invalidate #9144

merged 1 commit into from
Jun 18, 2020

Conversation

dandv
Copy link
Contributor

@dandv dandv commented Jun 18, 2020

Add validateBeforeSave and invalidate() to the Validation guide.

Is there a way to mark a field as valid, so it will be skipped by the pre-save validation?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@vkarpov15 vkarpov15 added this to the 5.9.20 milestone Jun 18, 2020
@vkarpov15 vkarpov15 added the docs This issue is due to a mistake or omission in the mongoosejs.com documentation label Jun 18, 2020
@vkarpov15 vkarpov15 merged commit 658d87f into Automattic:master Jun 18, 2020
@vkarpov15
Copy link
Collaborator

Re: "Is there a way to mark a field as valid, so it will be skipped by the pre-save validation?", Document#$markValid() is the inverse of invalidate().

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.

None yet

2 participants