Skip to content

Commit a5c98c2

Browse files
authoredDec 8, 2020
Allow array of validators in SchemaTypeOptions
1 parent a17a2c3 commit a5c98c2

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
@@ -1303,7 +1303,7 @@ declare module "mongoose" {
13031303
alias?: string;
13041304

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.