This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Now letโs see how we can use data annotations to write less code when implementing server-side validations.
Follow Along
To follow along commiting your changes to this course, you'll need to fork the aspnet-fitness-frog repo. Then you can clone, commit, and push your changes to your fork like this:
git clone <your-fork>
cd aspnet-fitness-frog
git checkout tags/v4.3 -b implementing-server-side-validation-using-data-annotations
Additional Learning
For more information about C# Attributes, see this page on MSDN.
For additional information on how ASP.NET MVC validation works, including another look at using data annotations, see this ASP.NET website tutorial.
Hereโs a project that extends the built-in data annotations.
Hereโs an article that walks through the steps to create a custom data annotation attribute.
Keyboard Shortcuts
-
CTRL-M CTRL-O
- Collapse to definitions
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
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