In ASP.NET MVC you can setup client side validations with the data annotations model which is similar to validations in ruby on rails. However there are unobtrusive javascript hooks created that will automatically wire up client side validations on forms. Is there anything like this for Ruby on Rails?
2 Answers
You can try my ClientSideValidations gem: https://github.com/bcardarella/client_side_validations
And there is Railscast about it: http://railscasts.com/episodes/263-client-side-validations
1 Comment
Martin
The ClientSideValidations gem will give you integration more similar to the MVC3 integration with jQuery validate, though it does not use jQuery.validation or data attributes to attach client side validators, like the MVC3 validation.
I was wondering this just the other day, and I found this awesome blog post about it!
http://sleekd.com/tutorials/jquery-validation-in-ruby-on-rails/
The short answer is yes, and the long answer is in the blogpost!
Andy