@types/mongoose : validateSync returns ValidationError

source: https://github.com/Automattic/mongoose/pull/7499#event-2127372731
This commit is contained in:
JulioJu
2019-02-09 10:08:24 +01:00
parent ceb5d446bd
commit 3722ab1c96
+2 -2
View File
@@ -1422,9 +1422,9 @@ declare module "mongoose" {
* Executes registered validation rules (skipping asynchronous validators) for this document.
* This method is useful if you need synchronous validation.
* @param pathsToValidate only validate the given paths
* @returns MongooseError if there are errors during validation, or undefined if there is no error.
* @returns ValidationError if there are errors during validation, or undefined if there is no error.
*/
validateSync(pathsToValidate?: string | string[]): Error;
validateSync(pathsToValidate?: string | string[]): Error.ValidationError;
/** Hash containing current validation errors. */
errors: any;