title: MVC 3 and DRY custom validation
body: <p>Unless I'm missing something (which is very possible), it seems to me that custom validation has always violated DRY.  In all the examples I've seen, even with the brand new Unobtrusive Client Validation introduced w/ MVC 3, we have to create .NET code for our server-side validation, and jQuery (or JavaScript code) for client-side validation.</p>
  
  <p>I understand that there's no such thing as a .NET-to-jQuery translator that would facilitate DRY server/client validation, and I guess that would be the only way to have true DRY validation that works both server and client side.</p>
  
  <p>But I would be perfectly content with having custom validation always performed on the server.  The data needed to pass into custom validation (in my case) is usually limited to one or two fields, and the server-side logic is usually pretty quick, even if it has to hit the database.</p>
  
  <p>Is there no OOTB mechanism for wiring up custom validation using attributes, then having your client side validation use Ajax to execute the validation server-side and respond to the client?  Or, has someone come up with such a solution?</p>
  
  <p>Or is it a matter of, in the end, the tradeoffs of repeating the custom validation is better than the issues introduced w/ always executing custom validation server side?</p>
  
  <p>Thanks in advance.</p>