-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.d.ts
More file actions
34 lines (31 loc) · 746 Bytes
/
index.d.ts
File metadata and controls
34 lines (31 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
type ValidatorMessages = {
base?: string;
required?: string;
enum?: string;
validate?: string;
unique?: string;
buffer?: string;
boolean?: string;
objectId?: string;
map?: string;
string?: string;
maxlength?: string;
minlength?: string;
regexp?: string;
number?: string;
'number.max'?: string;
'number.min'?: string;
date?: string;
'date.max'?: string;
'date.min'?: string;
};
type Paths = {
[path: string]: {
origin?: Boolean;
kind?: string;
message?: string;
};
};
declare function mongooseValidationErrorHandler(error: Error, options?: { messages?: ValidatorMessages, paths?: Paths }): Error;
declare namespace mongooseValidationErrorHandler {}
export = mongooseValidationErrorHandler;