Re: Prototype Based Validation with form_remote_tag

Tiago Motta
2008-10-08T22:58:39Z

Paul Shannon wrote:
> Hello,
>
> I am attempting to use validation.js from
> http://tetlaw.id.au/view/blog/really-easy-field-validation-with-prototyp
> e/ with form_remote_tag. The rails form helper binds the needed
> Ajax.Updater to the onSubmit action of the form. The validation.js also
> attempts to bind to the onSubmit of the form.
>
> The logic that is needed is
>
> if( valid.validate() )
> {
> ...Ajax.Updater...
> }
>
> where valid is the validation object
>
> How can I add this logic to the onSubmit that is added by the FormHelper
> in the rails framework?


Here is the solution:
http://programandosemcafeina.blogspot.com/2008/10/validacao-no-lado-cliente-com.html


>
> Alternatively, is anyone else using this validation library for
> client-side validation in conjunction with rails and has a better
> method?
>
> Cheers,
>
> Paul Shannon
> Web Applications Developer
>
> Codeweavers Limited
>
> Tel: 0870 443 0888
> Fax: 0870 443 0889

--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---