Prototype Based Validation with form_remote_tag

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