Prototype Based Validation with form_remote_tag

Paul Shannon wrote:


I am attempting to use validation.js from
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() )

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: