zod-express-middleware
zod-express-middleware copied to clipboard
Usage of safeParseAsync()
Hello, we're aiming to use async transformation steps in the zod validation within the middleware and we're getting the following error:
"message": "Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead."
https://github.com/colinhacks/zod#async-transforms
Would it be possible to enhance the processRequestBody
etc. functions to allow for those async zod parse calls? or add new ones that use the safeParseAsync
function from zod?
@v4ssili In case you still did not find a work around I forked it and fixed this issue and some others. Check it out: https://github.com/pshaddel/zod-express
thank you @pshaddel that's awesome!