Implementing Server-Side Validation Using Data Annotations4:36 with James Churchill
Now let’s see how we can use data annotations to write less code when implementing server-side validations.
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
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.
CTRL-M CTRL-O- Collapse to definitions
You need to sign up for Treehouse in order to download course files.Sign up