👩🏾‍🎤hello

hapi-joi

Posts with tags including:

hapi-joi

Joi Tutorial-Using @hapi/joi version 16.1.7 to validate a request body in a RESTful API.

Intro Why validate? Before we even get started I know there is someone thinking, " Why should I bother with validations in the backend? Validations should be done in the front end, after all, we have inbuilt HTML5 form validations, why must I validate twice? Well, it is good practice when designing your API to always design it in isolation never make any assumptions, cause, in all honesty, you never know who is going to consume your API.