Change into your project directory.
cd galvanize-bookshelfEnsure the staging area of the master branch is clean. Then, create and checkout a new feature branch.
git checkout -b validationsInstall the following NPM packages.
npm install --save joi@^9.0.4 express-validationMake a new validations directory.
mkdir validationsAnd create one validation file per route file.
touch validations/authors.js
touch validations/books.js
touch validations/token.js
touch validations/users.jsThen, add rules to validate the req.body of all POST requests for the following route files.
routes/authors.jsroutes/books.jsroutes/token.jsroutes/users.js
Then, add rules to validate the req.body of all PATCH requests for the following route files.
routes/authors.jsroutes/books.js