Christian R. Garner
2006-Apr-27 18:38 UTC
[Rails] Realtime Form Validation Plugin Available
Granted, I''m still very much a newbie, but after reading an article on AJAX that basically states at one point that just because you can use AJAX doesn''t always mean you should, I have to ask: Why bother contacting the server (even if it is an insignificant amount of bandwidth) to validate the sanity of form data (unless you''re actually validating against something in the database)? Wouldn''t it be better to just wrap it up in the JS on the page? - Christian On 4/27/06 11:23 AM, "Vince Puzzella" <vpuz@rogers.com> wrote:> > Hi Folks, > I developed a realtime form validation plugin. It uses AJAX to validate > from data on the fly. > > The DOM is dynamically modified as the user enters form data. Form fields > are wrapped with span elements which can be styled using CSS. > > See the readme.txt file for more info. > > You can get it here: http://rubyforge.org/projects/railsrtv/ >
This uses your model validation code to validate the object. After that, it sends back javascript which modifies your dom. That enables you to mark/unmark fields that contain invalid data using css. On 4/27/06 2:36 PM, "Christian R. Garner" <olus@digitalapathy.net> wrote:> Granted, I''m still very much a newbie, but after reading an article on AJAX > that basically states at one point that just because you can use AJAX > doesn''t always mean you should, I have to ask: Why bother contacting the > server (even if it is an insignificant amount of bandwidth) to validate the > sanity of form data (unless you''re actually validating against something in > the database)? Wouldn''t it be better to just wrap it up in the JS on the > page? > > - Christian > > On 4/27/06 11:23 AM, "Vince Puzzella" <vpuz@rogers.com> wrote: >> >> Hi Folks, >> I developed a realtime form validation plugin. It uses AJAX to validate >> from data on the fly. >> >> The DOM is dynamically modified as the user enters form data. Form fields >> are wrapped with span elements which can be styled using CSS. >> >> See the readme.txt file for more info. >> >> You can get it here: http://rubyforge.org/projects/railsrtv/ >> > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
DRY ... Your model should already contain all the necessary validation code to ensure sanity in your DB. Using ajax means you don''t have to repeat/port all the validation rules to javascript. Granted, this means more requests to the server, but I''m willing to live with that if it results in a more responsive/livley interface. On 4/27/06 2:59 PM, "Vince Puzzella" <vpuz@rogers.com> wrote:> This uses your model validation code to validate the object. After that, it > sends back javascript which modifies your dom. That enables you to > mark/unmark fields that contain invalid data using css. > > > On 4/27/06 2:36 PM, "Christian R. Garner" <olus@digitalapathy.net> wrote: > >> Granted, I''m still very much a newbie, but after reading an article on AJAX >> that basically states at one point that just because you can use AJAX >> doesn''t always mean you should, I have to ask: Why bother contacting the >> server (even if it is an insignificant amount of bandwidth) to validate the >> sanity of form data (unless you''re actually validating against something in >> the database)? Wouldn''t it be better to just wrap it up in the JS on the >> page? >> >> - Christian >> >> On 4/27/06 11:23 AM, "Vince Puzzella" <vpuz@rogers.com> wrote: >>> >>> Hi Folks, >>> I developed a realtime form validation plugin. It uses AJAX to validate >>> from data on the fly. >>> >>> The DOM is dynamically modified as the user enters form data. Form fields >>> are wrapped with span elements which can be styled using CSS. >>> >>> See the readme.txt file for more info. >>> >>> You can get it here: http://rubyforge.org/projects/railsrtv/ >>> >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Vince, I really want to use your plugin! really! Unfortunately after installing and referencing it in my application, I get the following error: NoMethodError (You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.select): /vendor/plugins/realtime_validation/lib/realtime_validation_system.rb:57:in `realtime_validation_for_input_form_contact_data_user_input_extract_multi_params'' /vendor/plugins/realtime_validation/lib/realtime_validation_system.rb:68:in `realtime_validation_for_input_form_contact_data_user_input_sanitize_multi_params'' /vendor/plugins/realtime_validation/lib/realtime_validation_system.rb:84:in `realtime_validation_for_input_form_contact_data_user_input'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `perform_action_without_filters'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' F:/Programme/Ruby-1.8.4/lib/ruby/1.8/benchmark.rb:293:in `measure'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in `perform_action'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in `process_without_filters'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in `process_without_session_management_support'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in `process'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in `handle_dispatch'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in `service'' F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:95:in `start'' F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:92:in `start'' F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:23:in `start'' F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:82:in `start'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in `dispatch'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59 F:/Programme/Ruby-1.8.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 F:/Programme/Ruby-1.8.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' ./script/server:3 -e:4 From this message I assume that this has something to do with multiparam handling, however, none of my fields shoudl require multiparams, they are only simple textfields with numerical or text values (i.e. I only have text_field tags in my view). I do have a checkbox and a form submit button (with the checkbox specifying an extra condition for the submit). Am I supposed to wrap these in span tags like you describe on your homepage?`I referenced your plugin from my controller and my view code like you described on your homepage. By the way, I''m very convinced that these instructions should read include UIEnhancements::RealtimeValidation helper :RealtimeValidation realtime_validation_for(:input_form, :contact_data_user_input) right? Any tips?? cheers Martin On 4/27/06, Vince Puzzella <vpuz@rogers.com> wrote:> DRY ... > > Your model should already contain all the necessary validation code to > ensure sanity in your DB. Using ajax means you don''t have to repeat/port > all the validation rules to javascript. Granted, this means more requests > to the server, but I''m willing to live with that if it results in a more > responsive/livley interface. > > > On 4/27/06 2:59 PM, "Vince Puzzella" <vpuz@rogers.com> wrote: > > > This uses your model validation code to validate the object. After that, it > > sends back javascript which modifies your dom. That enables you to > > mark/unmark fields that contain invalid data using css. > > > > > > On 4/27/06 2:36 PM, "Christian R. Garner" <olus@digitalapathy.net> wrote: > > > >> Granted, I''m still very much a newbie, but after reading an article on AJAX > >> that basically states at one point that just because you can use AJAX > >> doesn''t always mean you should, I have to ask: Why bother contacting the > >> server (even if it is an insignificant amount of bandwidth) to validate the > >> sanity of form data (unless you''re actually validating against something in > >> the database)? Wouldn''t it be better to just wrap it up in the JS on the > >> page? > >> > >> - Christian > >> > >> On 4/27/06 11:23 AM, "Vince Puzzella" <vpuz@rogers.com> wrote: > >>> > >>> Hi Folks, > >>> I developed a realtime form validation plugin. It uses AJAX to validate > >>> from data on the fly. > >>> > >>> The DOM is dynamically modified as the user enters form data. Form fields > >>> are wrapped with span elements which can be styled using CSS. > >>> > >>> See the readme.txt file for more info. > >>> > >>> You can get it here: http://rubyforge.org/projects/railsrtv/ > >>> > >> > >> _______________________________________________ > >> Rails mailing list > >> Rails@lists.rubyonrails.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Maybe I should add that the javascript produced on my page is: <script language="javascript"> new Ajax.Request(''/webca/input/realtime_validation_for_input_form_contact_data_user_input'', {asynchronous:true, evalScripts:true, onComplete:function(request){eval(request.responseText)}, parameters:foo = Form.serialize(''input_form'')}) </script> <script type="text/javascript"> //<![CDATA[ new Form.EventObserver(''input_form'', function(element, value) {new Ajax.Request(''/webca/input/realtime_validation_for_input_form_contact_data_user_input'', {asynchronous:true, evalScripts:true, onComplete:function(request){eval(request.responseText)}, parameters:foo = Form.serialize(''input_form'')})}) //]]> </script> Does this help? On 5/29/06, Martin Gamsjaeger <gamsnjaga@gmail.com> wrote:> Hi Vince, > > I really want to use your plugin! really! Unfortunately after > installing and referencing it in my application, I get the following > error: > > NoMethodError (You have a nil object when you didn''t expect it! > You might have expected an instance of Array. > The error occured while evaluating nil.select): > /vendor/plugins/realtime_validation/lib/realtime_validation_system.rb:57:in > `realtime_validation_for_input_form_contact_data_user_input_extract_multi_params'' > /vendor/plugins/realtime_validation/lib/realtime_validation_system.rb:68:in > `realtime_validation_for_input_form_contact_data_user_input_sanitize_multi_params'' > /vendor/plugins/realtime_validation/lib/realtime_validation_system.rb:84:in > `realtime_validation_for_input_form_contact_data_user_input'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in > `perform_action_without_filters'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in > `perform_action_without_benchmark'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in > `perform_action_without_rescue'' > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/benchmark.rb:293:in `measure'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in > `perform_action_without_rescue'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in > `perform_action'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in > `process_without_filters'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in > `process_without_session_management_support'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in > `process'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in > `dispatch'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in > `handle_dispatch'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in > `service'' > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:95:in `start'' > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:92:in `start'' > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:23:in `start'' > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:82:in `start'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in > `dispatch'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59 > F:/Programme/Ruby-1.8.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > `require'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 > F:/Programme/Ruby-1.8.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require'' > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > `require'' > ./script/server:3 > -e:4 > > From this message I assume that this has something to do with > multiparam handling, however, none of my fields shoudl require > multiparams, they are only simple textfields with numerical or text > values (i.e. I only have text_field tags in my view). I do have a > checkbox and a form submit button (with the checkbox specifying an > extra condition for the submit). Am I supposed to wrap these in span > tags like you describe on your homepage?`I referenced your plugin from > my controller and my view code like you described on your homepage. By > the way, I''m very convinced that these instructions should read > > include UIEnhancements::RealtimeValidation > helper :RealtimeValidation > realtime_validation_for(:input_form, :contact_data_user_input) > > right? > > Any tips?? > > cheers > Martin > > On 4/27/06, Vince Puzzella <vpuz@rogers.com> wrote: > > DRY ... > > > > Your model should already contain all the necessary validation code to > > ensure sanity in your DB. Using ajax means you don''t have to repeat/port > > all the validation rules to javascript. Granted, this means more requests > > to the server, but I''m willing to live with that if it results in a more > > responsive/livley interface. > > > > > > On 4/27/06 2:59 PM, "Vince Puzzella" <vpuz@rogers.com> wrote: > > > > > This uses your model validation code to validate the object. After that, it > > > sends back javascript which modifies your dom. That enables you to > > > mark/unmark fields that contain invalid data using css. > > > > > > > > > On 4/27/06 2:36 PM, "Christian R. Garner" <olus@digitalapathy.net> wrote: > > > > > >> Granted, I''m still very much a newbie, but after reading an article on AJAX > > >> that basically states at one point that just because you can use AJAX > > >> doesn''t always mean you should, I have to ask: Why bother contacting the > > >> server (even if it is an insignificant amount of bandwidth) to validate the > > >> sanity of form data (unless you''re actually validating against something in > > >> the database)? Wouldn''t it be better to just wrap it up in the JS on the > > >> page? > > >> > > >> - Christian > > >> > > >> On 4/27/06 11:23 AM, "Vince Puzzella" <vpuz@rogers.com> wrote: > > >>> > > >>> Hi Folks, > > >>> I developed a realtime form validation plugin. It uses AJAX to validate > > >>> from data on the fly. > > >>> > > >>> The DOM is dynamically modified as the user enters form data. Form fields > > >>> are wrapped with span elements which can be styled using CSS. > > >>> > > >>> See the readme.txt file for more info. > > >>> > > >>> You can get it here: http://rubyforge.org/projects/railsrtv/ > > >>> > > >> > > >> _______________________________________________ > > >> Rails mailing list > > >> Rails@lists.rubyonrails.org > > >> http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
Yihaa, I solved the problems! Thx Vince for your totally cool plugin!!! Here are the steps I had to perform in order to make it work 1) include UIEnhancements::RealtimeValidation helper :RealtimeValidation realtime_validation_for(:form_id_symbol, :model_symbol) instead of the lines shown on plugin homepage 2) give the controller instance variables (ActiveRecord objects) the same name as the model class they represent, i.e model :foo_data --> @foo_data 3) give all form_tag_helper methods an id named by modelnamewithoutunderscores_attribute_name_with_underscores Following these simple steps will let you ENJOY real time form validation! I love it :) Thx very much Vince!! cheers Martin On 5/29/06, Martin Gamsjaeger <gamsnjaga@gmail.com> wrote:> Maybe I should add that the javascript produced on my page is: > <script language="javascript"> > new Ajax.Request(''/webca/input/realtime_validation_for_input_form_contact_data_user_input'', > {asynchronous:true, evalScripts:true, > onComplete:function(request){eval(request.responseText)}, > parameters:foo = Form.serialize(''input_form'')}) > </script> > <script type="text/javascript"> > //<![CDATA[ > new Form.EventObserver(''input_form'', function(element, value) {new > Ajax.Request(''/webca/input/realtime_validation_for_input_form_contact_data_user_input'', > {asynchronous:true, evalScripts:true, > onComplete:function(request){eval(request.responseText)}, > parameters:foo = Form.serialize(''input_form'')})}) > //]]> > > </script> > > Does this help? > > On 5/29/06, Martin Gamsjaeger <gamsnjaga@gmail.com> wrote: > > Hi Vince, > > > > I really want to use your plugin! really! Unfortunately after > > installing and referencing it in my application, I get the following > > error: > > > > NoMethodError (You have a nil object when you didn''t expect it! > > You might have expected an instance of Array. > > The error occured while evaluating nil.select): > > /vendor/plugins/realtime_validation/lib/realtime_validation_system.rb:57:in > > `realtime_validation_for_input_form_contact_data_user_input_extract_multi_params'' > > /vendor/plugins/realtime_validation/lib/realtime_validation_system.rb:68:in > > `realtime_validation_for_input_form_contact_data_user_input_sanitize_multi_params'' > > /vendor/plugins/realtime_validation/lib/realtime_validation_system.rb:84:in > > `realtime_validation_for_input_form_contact_data_user_input'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in > > `perform_action_without_filters'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in > > `perform_action_without_benchmark'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in > > `perform_action_without_rescue'' > > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/benchmark.rb:293:in `measure'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in > > `perform_action_without_rescue'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in > > `perform_action'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in > > `process_without_filters'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in > > `process_without_session_management_support'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in > > `process'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in > > `dispatch'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in > > `handle_dispatch'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in > > `service'' > > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' > > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' > > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' > > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' > > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:95:in `start'' > > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:92:in `start'' > > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:23:in `start'' > > F:/Programme/Ruby-1.8.4/lib/ruby/1.8/webrick/server.rb:82:in `start'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in > > `dispatch'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59 > > F:/Programme/Ruby-1.8.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `require'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > > `require'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 > > F:/Programme/Ruby-1.8.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `require'' > > F:/Programme/Ruby-1.8.4/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > > `require'' > > ./script/server:3 > > -e:4 > > > > From this message I assume that this has something to do with > > multiparam handling, however, none of my fields shoudl require > > multiparams, they are only simple textfields with numerical or text > > values (i.e. I only have text_field tags in my view). I do have a > > checkbox and a form submit button (with the checkbox specifying an > > extra condition for the submit). Am I supposed to wrap these in span > > tags like you describe on your homepage?`I referenced your plugin from > > my controller and my view code like you described on your homepage. By > > the way, I''m very convinced that these instructions should read > > > > include UIEnhancements::RealtimeValidation > > helper :RealtimeValidation > > realtime_validation_for(:input_form, :contact_data_user_input) > > > > right? > > > > Any tips?? > > > > cheers > > Martin > > > > On 4/27/06, Vince Puzzella <vpuz@rogers.com> wrote: > > > DRY ... > > > > > > Your model should already contain all the necessary validation code to > > > ensure sanity in your DB. Using ajax means you don''t have to repeat/port > > > all the validation rules to javascript. Granted, this means more requests > > > to the server, but I''m willing to live with that if it results in a more > > > responsive/livley interface. > > > > > > > > > On 4/27/06 2:59 PM, "Vince Puzzella" <vpuz@rogers.com> wrote: > > > > > > > This uses your model validation code to validate the object. After that, it > > > > sends back javascript which modifies your dom. That enables you to > > > > mark/unmark fields that contain invalid data using css. > > > > > > > > > > > > On 4/27/06 2:36 PM, "Christian R. Garner" <olus@digitalapathy.net> wrote: > > > > > > > >> Granted, I''m still very much a newbie, but after reading an article on AJAX > > > >> that basically states at one point that just because you can use AJAX > > > >> doesn''t always mean you should, I have to ask: Why bother contacting the > > > >> server (even if it is an insignificant amount of bandwidth) to validate the > > > >> sanity of form data (unless you''re actually validating against something in > > > >> the database)? Wouldn''t it be better to just wrap it up in the JS on the > > > >> page? > > > >> > > > >> - Christian > > > >> > > > >> On 4/27/06 11:23 AM, "Vince Puzzella" <vpuz@rogers.com> wrote: > > > >>> > > > >>> Hi Folks, > > > >>> I developed a realtime form validation plugin. It uses AJAX to validate > > > >>> from data on the fly. > > > >>> > > > >>> The DOM is dynamically modified as the user enters form data. Form fields > > > >>> are wrapped with span elements which can be styled using CSS. > > > >>> > > > >>> See the readme.txt file for more info. > > > >>> > > > >>> You can get it here: http://rubyforge.org/projects/railsrtv/ > > > >>> > > > >> > > > >> _______________________________________________ > > > >> Rails mailing list > > > >> Rails@lists.rubyonrails.org > > > >> http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > >