Skip to content

Commit

Permalink
Allow array of validators in SchemaTypeOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
cjroebuck committed Dec 8, 2020
1 parent a17a2c3 commit a5c98c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Expand Up @@ -1303,7 +1303,7 @@ declare module "mongoose" {
alias?: string;

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

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

0 comments on commit a5c98c2

Please sign in to comment.