Validating Multiple Data Model Properties

In my previous article I wrote about displaying model state errors inside databound controls such as GridView. In that example we used data annotation validators to perform the validations. While data annotation validators do their job quite well they are inherently applied to only one data model property at a time. For example, the [StringLength] or [Required] attributes validate only one property under consideration. However, sometimes your validation rule involves multiple data model properties. In such cases data annotation validators won’t be of much use. Luckily there are other validation techniques that can come to your rescue.

http://www.bipinjoshi.net/articles/dafd59bb-e6dd-4b61-996d-18dc1aa2c29a.aspx

 

 

 

 

No Comments