New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine server side validations #4284
Labels
Comments
Now we're talkin'. I think we should write our own middleware based on zod, as you say – but this express one might provide some inspiration: |
26 tasks
This was referenced Feb 11, 2023
This was referenced Feb 28, 2023
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days |
This was referenced Jun 20, 2023
3 tasks
This was referenced Jul 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, different types of validations for a given API are scattered within the handlers as a bunch of assertions, added on ad-hoc basis. This ends up making handlers fat and cluttered. It'd be good if validations could be pulled out and be handled more declaratively, in one place, possibly through a middleware. It'd be worth exploring Zod for this purpose.
The text was updated successfully, but these errors were encountered: