Skip to content

Commit ccfa041

Browse files
authoredDec 9, 2020
Merge pull request #9686 from cjroebuck/patch-1
Allow array of validators in SchemaTypeOptions
2 parents 7a52e45 + a5c98c2 commit ccfa041

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ declare module "mongoose" {
13091309
alias?: string;
13101310

13111311
/** Function or object describing how to validate this schematype. See [validation docs](https://mongoosejs.com/docs/validation.html). */
1312-
validate?: RegExp | [RegExp, string] | Function | [Function , string] | ValidateOpts<T>;
1312+
validate?: RegExp | [RegExp, string] | Function | [Function , string] | ValidateOpts<T> | ValidateOpts<T>[];
13131313

13141314
/** Allows overriding casting logic for this individual path. If a string, the given string overwrites Mongoose's default cast error message. */
13151315
cast?: string;

0 commit comments

Comments
 (0)
Please sign in to comment.