DEV Community

Bruno Antunes
Bruno Antunes

Posted on

Next.js API Routes Validation with YUP

In this video we will add validation to our Next.js API Routes using YUP. In order to achieve that in a simple and reusable way we will create a validation middleware that uses YUP for schema validation.

Because we are using YUP, we can now share our validations across front-end and back-end. Form libraries like formik and react-hook-form work very well with YUP.

I hope you enjoy the video :)

Top comments (0)