1
- import * as express from 'express' ;
2
- import { Result , Options , Validator } from '../shared-typings' ;
3
-
4
- export const check : ValidationChainBuilder ;
5
- export const body : ValidationChainBuilder ;
6
- export const cookie : ValidationChainBuilder ;
7
- export const header : ValidationChainBuilder ;
8
- export const param : ValidationChainBuilder ;
9
- export const query : ValidationChainBuilder ;
10
- export function validationResult ( req : express . Request ) : Result ;
11
- export function oneOf ( chains : ValidationChain [ ] ) : express . RequestHandler ;
12
-
13
- export interface ValidationChainBuilder {
14
- ( field : string | string [ ] , message ?: string ) : ValidationChain ;
15
- }
16
-
17
- export interface ValidationChain extends express . RequestHandler , Validator {
18
- custom ( validator : CustomValidator ) : this;
19
- }
20
-
21
- export interface CustomValidator {
22
- ( value : any , options : { req : express . Request , location : string , path : string } ) : any ;
23
- }
1
+ import * as express from 'express' ;
2
+ import { Result , Options , Validator } from '../shared-typings' ;
3
+
4
+ export const check : ValidationChainBuilder ;
5
+ export const body : ValidationChainBuilder ;
6
+ export const cookie : ValidationChainBuilder ;
7
+ export const header : ValidationChainBuilder ;
8
+ export const param : ValidationChainBuilder ;
9
+ export const query : ValidationChainBuilder ;
10
+ export function validationResult ( req : express . Request ) : Result ;
11
+ export function oneOf ( chains : ValidationChain [ ] ) : express . RequestHandler ;
12
+
13
+ export interface ValidationChainBuilder {
14
+ ( field : string | string [ ] , message ?: string ) : ValidationChain ;
15
+ }
16
+
17
+ export interface ValidationChain extends express . RequestHandler , Validator { }
0 commit comments