Neil Cauldwell wrote: > This has probably been definitively answered elsewhere (it applies to > the default setup for restful_authentication), but I haven't been able > to track the solution down. My User model has a unique 'username' (or > :login, as it's known in RA) attribute, and it's going to be very > annoying for users to have to wait until a form is posted to find out > that their chosen username is already taken. Does anyone know of an easy > route for doing client side validation on this attribute? I think it's > the only attribute I need to do the client side validation on, and I > just want it to confirm whether or not a username is available, on the > fly... > > Any plugins, blog posts, quick tips? > > I found this post but, knowing the pace of Rails and considering it was > posted almost two years ago, I'm betting there's something newer out > there, plus it doesn't come with any specs; > > http://www.davidjrice.co.uk/articles/2006/11/29/inline-ajax-form-validation-plugin-for-ruby-on-rails
Update: These are probably the easiest tutorials to follow; http://apidock.com/rails/ActionView/Helpers/PrototypeHelper/observe_field http://weblogs.java.net/blog/bleonard/archive/2008/04/autovalidation.html Just make sure you manage your :validate action in relation to any before filters you may have in your users controller. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

