Skip to content

Commit

Permalink
Merge pull request #9686 from cjroebuck/patch-1
Browse files Browse the repository at this point in the history
Allow array of validators in SchemaTypeOptions
  • Loading branch information
vkarpov15 committed Dec 9, 2020
2 parents 7a52e45 + a5c98c2 commit ccfa041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Expand Up @@ -1309,7 +1309,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 ccfa041

Please sign in to comment.