views:

93

answers:

2

Does anyone have any recommendations for either of these validation ASP.Net MVC Validation frameworks?

  1. xVal: http://xval.codeplex.com/
  2. FluentValidation: http://fluentvalidation.codeplex.com/documentation
  3. NHibernate.Validator
  4. DataAnnotations

by the way: my project use sharp-architecture

A: 

This is a personal opinion, xVal and FluentValidation have there pro's and con's. NHibernate.Validator is lighter weight, and functions better if you are already using NHibernate as your schema loader. Then the obvious DataAnnotations is built into ASP.NET which is always something hard to resist.

Personally I use xVal for the built in jQuery validation.

Jacob Nelson
A: 

If you're using MVC 2, DataAnnotations and an xVal-like client side validation is built in.

If you're using MVC 1, you can use xVal alongside DataAnnotations. In fact, xVal by itself won't do anything for you--it's just a technology to link a server-side validation framework like DataAnnotations to a client-side validation framework like jQuery validation.

We're using DataAnnotations + xVal on a project and it's worked out all right. We needed to make some changes to the DataAnnotationsModelBinder.

John Bledsoe