Validation Application Block and ASP.NET MVC 4

Topics: Validation Application Block
May 7, 2013 at 6:56 AM
Does VAB from EntLib 6.0 integrates with ASP.NET MVC?

There is Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet.. but it's not clear whether it supposed to be use in just ASP.NET WebForms scenarios or both WebForms and MVC?
May 12, 2013 at 2:09 AM
There is no specific integration with VAB and ASP.NET MVC.

VAB Attributes are DataAnnotations so they can be used with with MVC. Or if you want to use VAB as a validation engine then you could create a ModelValidatorProvider for Enterprise Library. For example, see the article Enterprise Library Validation example for ASP.NET MVC 2 or a similar non-Enterprise Library example Creating a custom ModelValidatorProvider in ASP.NET MVC.

Randy Levy
Enterprise Library support engineer
Support How-to