tags:

views:

100

answers:

2

I am looking for a validation framework that can handle the validation of my business objects and also UI inputs. Preferably i want to not repeat my validation logic too much and try to use the DRY principles. So the ideal place would be my biz objects.

What have other ppl used? Also i've heard about the IDataErrorInfo, does anyone have a sample of how i can use it with MVC?

A: 

write your own Html extension methods. like

Html.TextBoxWithValidator(...)

cottsak
+1  A: 

If you're looking for a framework there's one on codeplex called xVal http://www.codeplex.com/xval

Scott Guthrie also made a post with some info about using built-in validation features. http://weblogs.asp.net/scottgu/archive/2008/09/02/asp-net-mvc-preview-5-and-form-posting-scenarios.aspx

Chad Moran