Monday, November 14, 2011

Depreciation of xVal?

I've learned that before MVC3's unobtrusive jQuery that it was trendy to use xVal for validations in tandem with jQuery's Validate plugin. With the unobtrusive approach apparently one just puts data annotations on properties (that will drive form fields) on the C# side and then jQuery is able to know how to validate fields based on stuff that bubbles up to the HTML that is rendered out. However, Joel was mentioning today that there is a way, with xVal, to reach out to universal resource identifier (URI) to create AJAX-driven rules to do sanity checkings such as making sure you are not about to rename a foo to a name already given to a different existing foo. Such checks may be nested in rules that one may register with xVal. He wasn't offhand sure if there is something comparable for the unobtrusive MVC3 approach. I guess we are going to do some digging. We may end up using a dash of xVal here or there in our MVC3 app in the worst case scenario.

No comments:

Post a Comment