Hi, I''m currently working on adding support to automatically generate client-side java-script validation code for the validations definied via the validates_xxx macros. I currently have a proof-of-concept patch against the subversion trunk and since I wanted to get some feedback as early as possible, I made it available as a research patch: http://dev.rubyonrails.com/ticket/861 Instead of repeating how to use this, I''ll simply refer to the above ticket and the HOWTO attached to it. If you want to play with it to get a feeling of how it will work, just apply the attached patch and follow the HOWTO. Comments, feedback, suggestions, questions, critics, etc. are very welcome. Hope this will be useful some day. Sebastian
This is somewhat off topic but here goes anyways. The next version of rails will ship with extensive Ajax support. One of the new features is to submit entire forms using ajax. Maybe this would be a fine base for JS like validation which could test more complex things as well ( like is login unique ). On Fri, 18 Mar 2005 01:12:11 +0100, Sebastian Kanthak <sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org> wrote:> Hi, > > I''m currently working on adding support to automatically generate > client-side java-script validation code for the validations definied via > the validates_xxx macros. > > I currently have a proof-of-concept patch against the subversion trunk > and since I wanted to get some feedback as early as possible, I made it > available as a research patch: > http://dev.rubyonrails.com/ticket/861 > > Instead of repeating how to use this, I''ll simply refer to the above > ticket and the HOWTO attached to it. If you want to play with it to get > a feeling of how it will work, just apply the attached patch and follow > the HOWTO. > > Comments, feedback, suggestions, questions, critics, etc. are very welcome. > > Hope this will be useful some day. > > Sebastian > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://www.snowdevil.ca - Snowboards that don''t suck http://www.hieraki.org - Open source book authoring http://blog.leetsoft.com - Technical weblog
I''ll hopefully get a chance to check this out over the weekend and give you some feedback. Hoping that between this and the ajax stuff my app will almost write itself ;) Cheers, Chris On Fri, 18 Mar 2005 01:12:11 +0100, Sebastian Kanthak <sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org> wrote:> Hi, > > I''m currently working on adding support to automatically generate > client-side java-script validation code for the validations definied via > the validates_xxx macros. > > I currently have a proof-of-concept patch against the subversion trunk > and since I wanted to get some feedback as early as possible, I made it > available as a research patch: > http://dev.rubyonrails.com/ticket/861 > > Instead of repeating how to use this, I''ll simply refer to the above > ticket and the HOWTO attached to it. If you want to play with it to get > a feeling of how it will work, just apply the attached patch and follow > the HOWTO. > > Comments, feedback, suggestions, questions, critics, etc. are very welcome. > > Hope this will be useful some day. > > Sebastian > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Michael Koziarski
2005-Mar-18 01:51 UTC
Re: [ANN] client-side java-script validation support
On Thu, 17 Mar 2005 19:18:50 -0500, Tobias Luetke <tobias.luetke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> This is somewhat off topic but here goes anyways. > > The next version of rails will ship with extensive Ajax support. One > of the new features is to submit entire forms using ajax. > > Maybe this would be a fine base for JS like validation which could > test more complex things as well ( like is login unique ).I haven''t seen this stuff show up in SVN yet (I haven''t really looked) but will we be using the right verbs? http://www.intertwingly.net/blog/2005/03/16/AJAX-Considered-Harmful> On Fri, 18 Mar 2005 01:12:11 +0100, Sebastian Kanthak > <sebastian.kanthak-ZS8b95Whz3sUSW6y5lq3GQ@public.gmane.org> wrote: > > Hi, > > > > I''m currently working on adding support to automatically generate > > client-side java-script validation code for the validations definied via > > the validates_xxx macros. > > > > I currently have a proof-of-concept patch against the subversion trunk > > and since I wanted to get some feedback as early as possible, I made it > > available as a research patch: > > http://dev.rubyonrails.com/ticket/861 > > > > Instead of repeating how to use this, I''ll simply refer to the above > > ticket and the HOWTO attached to it. If you want to play with it to get > > a feeling of how it will work, just apply the attached patch and follow > > the HOWTO. > > > > Comments, feedback, suggestions, questions, critics, etc. are very welcome. > > > > Hope this will be useful some day. > > > > Sebastian > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -- > Tobi > http://www.snowdevil.ca - Snowboards that don''t suck > http://www.hieraki.org - Open source book authoring > http://blog.leetsoft.com - Technical weblog > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers Koz
Sebastian Kanthak
2005-Mar-18 09:16 UTC
Re: [ANN] client-side java-script validation support
Tobias Luetke wrote:>This is somewhat off topic but here goes anyways. > >The next version of rails will ship with extensive Ajax support. One >of the new features is to submit entire forms using ajax. > >Maybe this would be a fine base for JS like validation which could >test more complex things as well ( like is login unique ). > > >I guess these are complementary ways of doing validations that both have their own merrits. From the top of my head. Pro Ajax validation: - allows for more complex validation - allows you to use custom ruby code in your validations contra: - requires a network round-trip, so is somewhere in the middle between server- and client-side regarding speed - higher requirements on the browser Of course this wasn''t a conclusive comparision but I think it is worthwile for rails to support both ways. Sebastian