Validation is like flossing: you know you should do it, but it’s easy to skip. And just like flossing, if you neglecting your validation, you’re asking for trouble.
The Joi module is Hapi’s answer to validation, but you don’t need to be using Hapi in order to use Joi. In this tutorial, we’ll show how we can use Joi to validate any object, and then we’ll take a look at how easily we can use Joi to validate requests made to Hapi applications.