We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55774c6 commit 399531bCopy full SHA for 399531b
types/schematypes.d.ts
@@ -285,10 +285,10 @@ declare module 'mongoose' {
285
validators: Validator[];
286
287
/** Adds validator(s) for this document path. */
288
- validate(obj: RegExp | ValidatorFunction | Validator, errorMsg?: string, type?: string): this;
+ validate(obj: RegExp | ValidatorFunction<DocType> | Validator<DocType>, errorMsg?: string, type?: string): this;
289
290
/** Adds multiple validators for this document path. */
291
- validateAll(validators: Array<RegExp | ValidatorFunction | Validator>): this;
+ validateAll(validators: Array<RegExp | ValidatorFunction<DocType> | Validator<DocType>>): this;
292
293
/** Default options for this SchemaType */
294
defaultOptions?: Record<string, any>;
0 commit comments