45.4. Assignments Security AS.0

Submission
You must submit assignments using git
Create Repo
  • Create an empty repo on bitbucket.org, gitlab.com, or github.com,
  • git push your local repo to the above remote repo.
  • For node assignments the line node_modules/must be in your .gitignore file.
Submit
By email to with:
  • The word 'submission <subjectname>' in the subject line
  • The url(s) of your repo(s) in the body

45.4.1. Assignment Security AS.0.0

In today's lesson you will find in Example 45.3 examples of extended schema attributes. You may copy the code from mongooseUser5.js to do the following.

  1. Try to violate the String constraint, and explain what happens. We are interested in the mongoose error message, and your interpretation of it.
  2. Try to violate the Number constraint, and explain what happens. We are interested in the mongoose error message, and your interpretation of it.
  3. Try to violate the Date constraint, and explain what happens. We are interested in the mongoose error message, and your interpretation of it.
  4. Lookup the keyword unique, and explain what it does. Make an experiment that proves yours and mongooses point.
  5. Try to violate the required constraint, and explain what happens. We are interested in the mongoose error message, and your interpretation of it.