Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Instruction
Next Steps: Expand Data Validation Requirements
Now that you've learned about some additional validation types let's expand the data validation requirements for creating new user accounts by requiring a password.
-
In your
POST
/api/users
route request handler, add anif
statement that checks for a missingpassword
value:router.post('/users', (req, res) => { ... // Validate that we have a `name`...