# LiveValidation and form\_remote\_tag

**URL:** <https://www.ruby-forum.com/t/livevalidation-and-form-remote-tag/127864>\
**Category:** Rails\
**Created:** [February 1, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/livevalidation-and-form-remote-tag/127864 "2008-02-01T22:14:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [February 1, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/livevalidation-and-form-remote-tag/127864/1 "2008-02-01T22:14:48Z")

</div>

form\_remote\_tag(:update =\> “ListDateDiv”, :url=\> { :action =\>  
‘new\_date’},:complete =\> “onEventDateInsered()”,:html=\>{:multipart =\>  
true,:class=\>‘FormNewEdit’})

I have an ajax form with some fields.  
Ex.

var place\_site\_v = new LiveValidation(‘place\_site’,  
{insertAfterWhatNode: “PlaceSiteValidatorReport” ,validMessage:  
“”,onlyOnBlur: true});  
place\_site\_v.add(Validate.Format, { pattern:  
/^(http|https)://[a-z0-9]+([-.]{1}[a-z0-9]+)_.[a-z]{2,5}(([0-9]{1,5})?/._)?$/i,  
failureMessage: “Indirizzo sbagliato! Es. [http://nerto.it](http://nerto.it)” });

In this fields if i use LiveValidation the attribure onsubmit of form is  
override form LiveValidation and ajax not works.

How i can do?

Thanks

---

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [March 13, 2009, 4:34pm UTC](https://www.ruby-forum.com/t/livevalidation-and-form-remote-tag/127864/2 "2009-03-13T16:34:48Z")

</div>

I used the lastest Live Validation lib 1.3  
But it still cannot work with remote\_form\_for…

and it’s also cannot work with a form which called by ajax.

Help!

On 2008Äê2ÔÂ13ÈÕ, ÏÂÎç10Ê±52·Ö, Alec H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [February 13, 2008, 3:52pm UTC](https://www.ruby-forum.com/t/livevalidation-and-form-remote-tag/127864/3 "2008-02-13T15:52:35Z")

</div>

Luca R. wrote:

> form\_remote\_tag(:update =\> “ListDateDiv”, :url=\> { :action =\>  
> ‘new\_date’},:complete =\> “onEventDateInsered()”,:html=\>{:multipart =\>  
> true,:class=\>‘FormNewEdit’})
> 
> I have an ajax form with some fields.  
> Ex.
> 
> var place\_site\_v = new LiveValidation(‘place\_site’,  
> {insertAfterWhatNode: “PlaceSiteValidatorReport” ,validMessage:  
> “”,onlyOnBlur: true});  
> place\_site\_v.add(Validate.Format, { pattern:  
> /^(http|https)://[a-z0-9]+([-.]{1}[a-z0-9]+)_.[a-z]{2,5}(([0-9]{1,5})?/._)?$/i,  
> failureMessage: “Indirizzo sbagliato! Es. [http://nerto.it](http://nerto.it)” });
> 
> In this fields if i use LiveValidation the attribure onsubmit of form is  
> override form LiveValidation and ajax not works.
> 
> How i can do?
> 
> Thanks

Hi Luca,

The new release of LiveValidation is on its way soon, which has had an  
overhaul on the events registration which now means that any previously  
defined events on those that LiveValidation hooks onto will be  
preserved (ie when using form\_remote\_tag and observe\_field etc)

I have tagged a stable beta version in the repository at:

svn://livevalidation.com/livevalidation/tags/1.3-beta

which you can grab and should solve your problem, and should just slot  
in without any modifications to your code.

Let me know if you encounter any problems if you decide to give it a try

Thanks

Alec
