O'Reilly logo

Getting Started with hapi.js by John Brett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we've looked at the topic of validation and joi, the object schema validation library used throughout the hapi ecosystem. We looked at the importance of validating our inputs, and how to keep this work manageable by using joi.

Hopefully, this chapter has given you a good grounding in the flexibility of joi, and also in how to make your code more robust and readable so that you can use joi both within or outside of hapi applications. I recommend having a full read of joi's documentation and repo examples before moving on to the next chapter.

One of the drawbacks of joi at the moment is that it only supports server-side validation out of the box. However, as popularity grows, I expect this to change in the future, and with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required