Skip to content

Commit

Permalink
Update document.js
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 authored Jul 20, 2023
1 parent 70e6a3b commit 2fadab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -2521,11 +2521,11 @@ Document.prototype.isDirectSelected = function isDirectSelected(path) {
*
* #### Note:
*
* This method is called `pre` save and if a validation rule is violated, [save](https://mongoosejs.com/docs/api/model.html#Model.prototype.save()) is aborted and the error is returned.
* This method is called `pre` save and if a validation rule is violated, [save](https://mongoosejs.com/docs/api/model.html#Model.prototype.save()) is aborted and the error is thrown.
*
* #### Example:
*
* doc.validate({ validateModifiedOnly: false, pathsToSkip: ['name', 'email']});
* await doc.validate({ validateModifiedOnly: false, pathsToSkip: ['name', 'email']});
*
* @param {Array|String} [pathsToValidate] list of paths to validate. If set, Mongoose will validate only the modified paths that are in the given list.
* @param {Object} [options] internal options
Expand Down

0 comments on commit 2fadab8

Please sign in to comment.