Create a NodeJS API with Koa and TypeScript - #8 - Easy Validation with Class Validator
9K views
Feb 14, 2023
Before we can consider persisting data off to storage, we need to ensure the data is in a known good shape. This means validation. And there is a really nice library that solves this problem very effectively for us. We will be using the Class Validator library. This will solve all our validation concerns, and even take care of creating a lovely error object that we can return to our API consumers. We didn't add this library at the start of our project as there is a touch extra setup required. Let's take care of this now.
#Computer Education
# Educational Software
# Training & Certification