Javascript validation for a form?

Hello,

I’ve made a form with a validation system in rails
(validates_presence_of etc) but I’ld like also to make a classic
validation with an external javascript to have a direct client
validation without sending to the server. Is it possible?

Thanks you for your help,

How about trying live validation?

On Mon, May 19, 2008 at 2:58 AM, san 1981
[email protected] wrote:

Posted via http://www.ruby-forum.com/.


Ramon T.

Ramon T. wrote:

How about trying live validation?

On Mon, May 19, 2008 at 2:58 AM, san 1981
[email protected] wrote:

Posted via http://www.ruby-forum.com/.

Thanks Tayag, I didn’t know live validation but that seems really
interesting, I’ll try this.

I’ve yet a question about the classic rails validation… When I add
“validates_presence_of :email”; if the field “email” is empty, when the
submitting I receive an error message " You have a nil object when you
didn’t expect it! You might have expected an instance of Array. The
error occurred while evaluating nil.collect’. If the field “email” is
filled, the field with select .collect works perfectly?

san 1981 wrote:

Ramon T. wrote:

How about trying live validation?

On Mon, May 19, 2008 at 2:58 AM, san 1981
[email protected] wrote:

Posted via http://www.ruby-forum.com/.

Thanks Tayag, I didn’t know live validation but that seems really
interesting, I’ll try this.

I’ve yet a question about the classic rails validation… When I add
“validates_presence_of :email”; if the field “email” is empty, when the
submitting I receive an error message " You have a nil object when you
didn’t expect it! You might have expected an instance of Array. The
error occurred while evaluating nil.collect’. If the field “email” is
filled, the field with select .collect works perfectly?

I’ll say that if the field “email” is filled, the form is well
submitted. I received the error message only if this field is empty.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs