Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Sequelize Model Validation!
You have completed Sequelize Model Validation!
Preview
Test the confirmedPassword attribute added to the User model and the VIRTUAL data type change made to the password attribute.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
as well as the virtual data type
change made to the password attribute.
0:00
If the confirmedPassword and
password values match, the setter and
0:00
confirmedPassword should hash
the password and set the value to store.
0:05
And, setting passwords datatype to virtual
0:10
should prevent the unhatched password
from being stored in the database.
0:13
In Postman, our first test sending a POST
request with passwords that do not match
0:18
I get a 400 status with the error both
passwords must match in the response.
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up