Skip to content

fbw-d09/be-record-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Validation and Sanitization

In this task we will introduce data validation. How we will know that the format of the email the user inserted is valid? Using express-validator we will validate our data before we save them in our database. If something is not valid, we will return a detailed error message to the user. After validation, we will sanitize our data using express-validator. Validation is about making sure our data are in the right format. Sanitzation though is all about making sure the data are also noise-free. No extra spaces, no uppercase mixed with lowercase, normalized emails etc.

TODO

  1. Install express-validator.
  2. Validate data for the user schema.
  3. After validation of the data, please sanitize them as well.
  4. In the end, please create a custom validation middleware boilerplate and bring all your validators there.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published