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

feat: joi validation blog post #36

Merged
merged 4 commits into from
Jul 17, 2023
Merged

feat: joi validation blog post #36

merged 4 commits into from
Jul 17, 2023

Conversation

Eomm
Copy link
Owner

@Eomm Eomm commented May 29, 2023

TODO:

  • Requires fastify v4.18

@Eomm Eomm marked this pull request as ready for review June 10, 2023 06:46
You could use either the version I committed — see below:

"If you are an hapi developer, you may know the joi library. It is a powerful validation library that allows you to define programmatic schemas for your data and validate them with ease."

Or 

"If you are an hapi developer, you may know the joi library. It is a powerful validation library that allows you to programmatically define schemas for your data and validate them with ease."
Really great work. I just made a few minor tweaks as part of this commit. 

I'll explain my reasoning for the changes I made to this section.

- buildValidator: The function to pass to the schemaController option of Fastify.
- bucket: The joi bucket that contains the schemas when you call the app.addSchema(joiSchema) method. You can omit this option if you don't use. app.addSchema
- joi: A customized joi instance that contains the installed extensions, if there are any. It is a good practice to use this instance to build your schemas.

I added capitalisation (title case) and full stops to all of the bullets because the second two bullet points have two sentences. 

This meant you'd used title case in the second part of those bullet points and punctuation in the first point.

So, I made the changes I did to make sure things were consistent — title case at the start of each bullet point and punctuation at the end of each bullet point.

Let me know if you have any questions about what I did 🙂.
@Eomm Eomm merged commit 379202e into master Jul 17, 2023
2 checks passed
@Eomm Eomm deleted the joi branch July 17, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants