On Aug 22, 10:43 am, Wap Addon <[email protected]>
wrote:
> jhaagmans wrote:
> > Why are you doing this in javascript when you can do this beautifully
> > in your controller? Create the appropriate validations in your model
> > and then in your controller check whether saving is possible. If it
> > is, save it and redirect or whatever you want it to do. If not, catch
> > the error and show it.
>
> ok dear but this is server side validation. i want to use client side
> validate.
>
> server side take more time execution so that client side validation more
> fast. so that i want to use external js validation.
I hope you are also doing server side validation. This is better done
from the form's onsubmit, and don't forget to return the value of your
validation function (don't just call it as you are doing now)
Fred
> --
> Posted viahttp://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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---