Read the full tutorial at http://www.primaryobjects.com/CMS/Article141.aspx
What is it?
Example of configuring MVC .NET data annotations from an XML file at run-time, for a C# ASP .NET MVC4 web application, razor, jQuery, client validation. This example simulates a data entry form, allowing the user to fill out the fields and submit data. Form field validation is performed via MVC data annotation attributes, loaded from an XML file.
Why?
C# ASP .NET MVC data annotations allow developers to specify validation for each member within a class or type object by using C# attributes. While data annotation validation allows for powerful maintainability of type libraries, occasionally the need arises to create data annotations outside of the C# code. This can allow for validation setup by other users, content management systems, or other processes outside of the web application code. This example demonstrates form field validation that can be configured and modified by simply updating an XML file.