3

Ok I've spent a lot of time reading all the various blog posts on Validation. We are currently in the middle of writing an app in MVC 2.0 and noticed the Model Validation Providers, can anyone provide any examples or links to good solid examples?

Cheers

2 Answers 2

3

This is an excellent example of the new jQuery validation provider (which is currently the default) in MVC 2 Preview 2 - http://blogs.msdn.com/rickandy/archive/2009/10/03/client-side-validation-for-mvc-2-p2.aspx

Sign up to request clarification or add additional context in comments.

6 Comments

For more examples of DataAnnatations validation provider, see ScottGu's blog: weblogs.asp.net/scottgu/archive/2009/07/31/…
Is this a Model Validation Provider?
Yes, the baked in jQuery validator is based on the Model Validation Provider. You can create your own, or get others and simply plug them in.
ok cool, how would you go about server validation as well? Javascript validation is kinda out of the question because of the nature of the app.
The MVC 2 preview 2 validation does both client and server validation. The server validation is done during model binding.
|
0

XVal is the forerunner in this field, Steve Sanderson is a real smartie pants!

Kindness,

Dan

1 Comment

This seems to be the way to do it MVC 1.0 I'm looking for the new way to do it in MVC 2.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.