DEV Community

Discussion on: Dealing With Unexpected Data in JavaScript

Collapse
 
michaeljota profile image
Michael De Abreu

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).

Collapse
 
_staticvoid profile image
Lucas Santos

Awesome! This would be an awesome article to write! Thanks for the suggestion