- validate(validations): ((req, res, next) => Promise<void>)
-
Returns ((req, res, next) => Promise<void>)
-
- (req, res, next): Promise<void>
-
Parameters
-
req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
-
res: Response<any, Record<string, any>>
-
next: NextFunction
Returns Promise<void>
Description
this function is used to validate the request body
Example
Example
example with controller
Example
// example of error response email is not valid