Skip to content
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

AJV8 validation inside preHandler #720

Closed
conioX opened this issue Jul 17, 2022 · 3 comments
Closed

AJV8 validation inside preHandler #720

conioX opened this issue Jul 17, 2022 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@conioX
Copy link

conioX commented Jul 17, 2022

Hi Guys, there is a method/function from fastify to validate inside pre handler? like fastify.validation(schema)?

@conioX conioX added the help wanted Extra attention is needed label Jul 17, 2022
@conioX conioX changed the title AJV8 inside validation inside preHandler AJV8 validation inside preHandler Jul 17, 2022
@Eomm
Copy link
Member

Eomm commented Jul 20, 2022

It will be released soon in v4.3.0 as request.validateInput

ref fastify/fastify#4139

@Eomm Eomm closed this as completed Jul 20, 2022
@conioX
Copy link
Author

conioX commented Jul 23, 2022

hi @Eomm, i think Type definition for the typescript still request.validate not request.validateInput

@metcoder95
Copy link
Member

Hi @conioX, thanks for the heads up! I opened a PR for applying the fix. The issue was on me!

PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants