diff --git a/lib/document.js b/lib/document.js index 989a0558db6..752b40041c7 100644 --- a/lib/document.js +++ b/lib/document.js @@ -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