hey all, I am having a hard time looking for a plugin/gem to auto-validate a form in client-side, just like "live-validations"... I tried to download and install it via "script/plugin install git:// github.com/porras/live-validations.git" but no plugin was found... i don''t wanna know from you guys HOW to do it, i just wanna know if anyone here uses this kind of validation, and which plugin/gem you use... So, any ideas? I`ll keep up the research for a way to do it easily... Oh, important: i need a tool that does the validation according to model rules.... Thanks in advance. Sempre Alerta Para Servir, Lucas Franceschi Equipe de Programação (Automação) SGI Sistemas (049) 9922-3360 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
lucas franceschi wrote:> I am having a hard time looking for a plugin/gem to auto-validate a form > in > client-side, just like "live-validations"... > <snip> > i don''t wanna know from you guys HOW to do it, i just wanna know if > anyone > here uses this kind of validation, and which plugin/gem you use...Personally, I don''t generally use client-side validation. The problem that I see with doing validation client-side is that there is no guarantee that client-side scripting is enabled. Which means that any client-side validation must be duplicated server-side anyway. Any differences in server and client validation algorithms could be confusing to the user, or worse end up allowing invalid data to reach the database. If you were relying on a particular client-side validation that did not exist server-side (either accidentally or by design) that could easily allow invalid input into the database. I prefer to have all my validation logic side the model (server-side). I am of the opinion that it is the responsibility of the Model layer of MVC to validate data and not the View layer. Although the view objects can often assist the user with entering proper values, such as with drop-downs, checkboxes, radio buttons, etc. But, I would not rely on the view for full and proper input validation. -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> Personally, I don''t generally use client-side validation.It''s painful when you upload a 10MB file with the form, and then server-side validation tells you you forgot to type a description. Now you need to reupload the 10MB file... -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
http://articles.sitepoint.com/article/form-validation-client-side well, I do think your point is quite right, that''s why you never use pure javascript validation in the view... what i am talking about, is a gem, or plugin, that you don''t need to say what to validate, it just, reads the model rules, and apply it in the view... actually, ''live-validations'' do it, but i''m having trouble making it work... that''s why i came to you guys... anyone? Sempre Alerta Para Servir, Lucas Franceschi Equipe de Programação (Automação) SGI Sistemas (049) 9922-3360 On Fri, Jun 18, 2010 at 12:58 PM, Fernando Perez <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> > > Personally, I don''t generally use client-side validation. > It''s painful when you upload a 10MB file with the form, and then > server-side validation tells you you forgot to type a description. Now > you need to reupload the 10MB file... > -- > Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez wrote:> >> Personally, I don''t generally use client-side validation. > It''s painful when you upload a 10MB file with the form, and then > server-side validation tells you you forgot to type a description. Now > you need to reupload the 10MB file...That exactly why I included the word "generally." I was not talking about specific cases such as you describe. -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Robert, I agree with you, but if there was a gem, that would just do the validation *based on the model rules*, wouldn''t it solve your problem, and mine''s? well, there is that gem, that plugin, whatever... and there''s more than one, live-validation and client-side-validation, plugin and gem repectively, exists for this purpose... *but* it''s not working... i just cant get it to work the way all the how-to''s say... anyone here did use one of those???? Sempre Alerta Para Servir, Lucas Franceschi Equipe de Programação (Automação) SGI Sistemas (049) 9922-3360 On Fri, Jun 18, 2010 at 3:30 PM, Robert Walker <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Fernando Perez wrote: > > > >> Personally, I don''t generally use client-side validation. > > It''s painful when you upload a 10MB file with the form, and then > > server-side validation tells you you forgot to type a description. Now > > you need to reupload the 10MB file... > > That exactly why I included the word "generally." I was not talking > about specific cases such as you describe. > -- > Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.