- default(schema: AnyZodObject): ((req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void | Response<any, Record<string, any>>)
-
Returns ((req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void | Response<any, Record<string, any>>)
-
- (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction): void | Response<any, Record<string, any>>
-
Parameters
-
req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
-
res: Response<any, Record<string, any>>
-
next: NextFunction
Returns void | Response<any, Record<string, any>>
This middleware will validate the request body using zod schema
Author
aayushchugh