parikshit
2006-Apr-28 16:00 UTC
[Rails] how to do form field validation using javascript in rubyonrails
hi all can any body tell me how to javascript validation in ruby on rails for form field thnx in advance
John Tsombakos
2006-Apr-28 17:38 UTC
[Rails] how to do form field validation using javascript in rubyonrails
On 4/28/06, parikshit <parikshit.mishra@wwindia.com> wrote:> > hi all > can any body tell me how to javascript validation in ruby on rails > for form field > thnx in advanceThe same way you do it in a non-rails web form: http://www.google.com/search?q=javascript+form+validation
Roberto Saccon
2006-Apr-28 17:42 UTC
[Rails] how to do form field validation using javascript in rubyonrails
unless there is a tool I am not aware of, you have to code by yourself. You need to observe each field of the form (with prototype.js) and when it has changed, you need to validate with help of regular expressions. Hope that gets you started. You could also take a look at the sourcecode and examples of the dojo toolkit, there it is implemented as described above. On 4/28/06, parikshit <parikshit.mishra@wwindia.com> wrote:> > > hi all > can any body tell me how to javascript validation in ruby on rails > for form field > thnx in advance > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Roberto Saccon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060428/ee2b0a4f/attachment.html
Vince Puzzella
2006-Apr-28 19:09 UTC
[Rails] how to do form field validation using javascript in rubyonrails
I developed an ajax-based validation plugin. It uses your models validation rules to validate form data on the server-side in real-time. You can then mark/unmark form fields based on their state (valid/invalid) using css. Download and see the readme.txt for more info. http://rubyforge.org/projects/railsrtv/ On 4/28/06 1:41 PM, "Roberto Saccon" <rsaccon@gmail.com> wrote:> unless there is a tool I am not aware of, you have to code by yourself. You > need to observe each field of the form (with prototype.js) and when it has > changed, you need to validate with help of regular expressions. > > Hope that gets you started. > > You could also take a look at the sourcecode and examples of the dojo toolkit, > there it is implemented as described above. > > On 4/28/06, parikshit <parikshit.mishra@wwindia.com> wrote: >> >> hi all >> can any body tell me how to javascript validation in ruby on rails >> for form field >> thnx in advance >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060428/7ef68e22/attachment-0001.html