views:

399

answers:

3

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

xVal

MVC Validator Toolkit

+2  A: 

xVal is pretty much the standard way to do client-side validation in ASP.NET MVC. Actually today Steve Sanderson just released a new version of it :)

xVal v1.0 Now Available

The ASP.NET MVC v2 will have client-side validation built in, but it is currently only in Preview 1 so it will be quite some time before that project will be released. You can view more about this on Stephen Walther's blog post...

Microsoft Ajax CDN and the jQuery Validation Library

I would suggest to use xVal until ASP.NET MVC v2 get released.

Elijah Manor
A: 

I'm using XVal as you get client and server validation with the same framework, it integrates well with MVC code.

Paul
A: 

I've been using the Data Annotation Validators with great success. I know it's not the final solution that we'll see with MVC v2, but it's easy to implement and very flexible.

http://mstecharchitect.blogspot.com/2009/08/data-annotations-validation-in-aspnet.html http://www.asp.net/learn/mvc/tutorial-39-cs.aspx

The advantage to this approach is that you can do some very complex validations (albeit not client-side) through creating custom attributes. It's also very testable.

Nissan Fan