Great article. I use packages such as class-validator, and class-transform to perform this kind of validation in the server. However, it's always nice to have JS regular alternatives just in case.
BTW, I would love to read an article about your recommendations of the HTTP codes usages. I've read something before, but I like your opinions about 422 and 206 (But I would always return 206 because it never will be all the content).
Brazilian developer since 2011. Microsoft MVP, Docker Captain, and Google Dev Expert. OpenJS foundation member and Node.js contributor. Loves JavaScript and TypeScript.
Great article. I use packages such as class-validator, and class-transform to perform this kind of validation in the server. However, it's always nice to have JS regular alternatives just in case.
BTW, I would love to read an article about your recommendations of the HTTP codes usages. I've read something before, but I like your opinions about 422 and 206 (But I would always return 206 because it never will be all the content).
Awesome! This would be an awesome article to write! Thanks for the suggestion