Hello, Every now and then, I use a web app and it tells me that this or that field is invalid. Generally it''s an email address that doesn''t accept a plus before the @, or a phone number that doesn''t accept well formated international phone numbers (starting with a plus, containing hyphens) or maybe it fails to deal with my name or last name which contain this terrible characters: é and á. Of course, the developed failed here. Generally I try to have my validations be much better about it, but I''m sure that I''m not inmune to the issue of rejecting valid data. What concerns me is that, unlike exceptions, for which I get an email, I''ll never know about this issues unless a user tells me, and they rarely do. So, I was thinking, wouldn''t it be nice if Rails automatically saved the attributes of an object to the database when the validations fail? I suppose a gem could do it by monkey-patching validate or something like that and I''m also sure I''m not the first one to think of this. Does anybody know if that gem already exists? If not, I''ll give it a try. What do you think about this feature? Does it sound useful? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/SOpTwfFJA8QJ. 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.
2011/9/17 J. Pablo Fernández <pupeno-GAtDADarczzQT0dZR+AlfA@public.gmane.org>> Hello, > > Every now and then, I use a web app and it tells me that this or that field > is invalid. Generally it''s an email address that doesn''t accept a plus > before the @, or a phone number that doesn''t accept well formated > international phone numbers (starting with a plus, containing hyphens) or > maybe it fails to deal with my name or last name which contain this terrible > characters: é and á. Of course, the developed failed here. > > Generally I try to have my validations be much better about it, but I''m > sure that I''m not inmune to the issue of rejecting valid data. What concerns > me is that, unlike exceptions, for which I get an email, I''ll never know > about this issues unless a user tells me, and they rarely do. > > So, I was thinking, wouldn''t it be nice if Rails automatically saved the > attributes of an object to the database when the validations fail? I suppose > a gem could do it by monkey-patching validate or something like that and I''m > also sure I''m not the first one to think of this. > > Does anybody know if that gem already exists? If not, I''ll give it a try. > What do you think about this feature? Does it sound useful? > >Certainly a good idea. It is a source of frustration that otherwise remains hidden. I would write this to the log with an INFO level and a special keyword, so I can collect the validation errors for analysis. Peter -- 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.
> So, I was thinking, wouldn''t it be nice if Rails automatically > saved the attributes of an object to the database when > the validations fail?No, it wouldn''t. Do you really want to have billions of records in your database from all the spam bots trying to log in? -- 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.
On Saturday, September 17, 2011 7:00:18 PM UTC+2, Ruby-Forum.com User wrote:> > > So, I was thinking, wouldn''t it be nice if Rails automatically > > saved the attributes of an object to the database when > > the validations fail? > > No, it wouldn''t. Do you really want to have billions of records in your > database from all the spam bots trying to log in? >I never did this of course, but in similar situations, filtering bots wasn''t that hard. The filter was not perfect, but you don''t want perfect, you don''t need to catch every time someone puts valid information and is marked as invalid; you just need to get some of those, to improve the app. If you don''t log or remove the entries for China and Russia and maybe some other countries, in my experience, you''ll get rid of most bots. Other filters could be, for example, invalid emails without an @ I don''t care about, but invalid ones with an @ I do care about. You may want to have a captcha in your form anyway. In most applications I built, the only public part is the register/login. Fine, I don''t log those. But the complex forms inside that my customers use constantly, I do want to know whether they are friendly or not. I see the problem you point to, but I don''t think it''s a showstopper. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/qQINNXrWp44J. 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.
Well, then how about: if not user.valid? logger.info user.errors.full_messages end -- 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.
2011/9/17 J. Pablo Fernández <pupeno-GAtDADarczzQT0dZR+AlfA@public.gmane.org>> Hello, > > Every now and then, I use a web app and it tells me that this or that field > is invalid. Generally it''s an email address that doesn''t accept a plus > before the @, or a phone number that doesn''t accept well formated > international phone numbers (starting with a plus, containing hyphens) or > maybe it fails to deal with my name or last name which contain this terrible > characters: é and á. Of course, the developed failed here. > > Generally I try to have my validations be much better about it, but I''m > sure that I''m not inmune to the issue of rejecting valid data. What concerns > me is that, unlike exceptions, for which I get an email, I''ll never know > about this issues unless a user tells me, and they rarely do. > > So, I was thinking, wouldn''t it be nice if Rails automatically saved the > attributes of an object to the database when the validations fail? I suppose > a gem could do it by monkey-patching validate or something like that and I''m > also sure I''m not the first one to think of this. > > Does anybody know if that gem already exists? If not, I''ll give it a try. > What do you think about this feature? Does it sound useful? >http://addons.heroku.com/tripwire "... Have you ever filled out a form only to have it rejected because of an unexpected, overly-restrictive validation error? It''s frustrating and annoying, and it probably happens to your users too. Tripwire shows you the validation errors your users are experiencing, giving you a new way to uncover UX issues in your app. ..." Seems pretty much what you asked for. Peter -- 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.
On Tue, Sep 20, 2011 at 20:43, Peter Vandenabeele <peter-jNuWw7i2w7syMbTcgqFhxg@public.gmane.org>wrote:> 2011/9/17 J. Pablo Fernández <pupeno-GAtDADarczzQT0dZR+AlfA@public.gmane.org> > >> Hello, >> >> Every now and then, I use a web app and it tells me that this or that >> field is invalid. Generally it''s an email address that doesn''t accept a plus >> before the @, or a phone number that doesn''t accept well formated >> international phone numbers (starting with a plus, containing hyphens) or >> maybe it fails to deal with my name or last name which contain this terrible >> characters: é and á. Of course, the developed failed here. >> >> Generally I try to have my validations be much better about it, but I''m >> sure that I''m not inmune to the issue of rejecting valid data. What concerns >> me is that, unlike exceptions, for which I get an email, I''ll never know >> about this issues unless a user tells me, and they rarely do. >> >> So, I was thinking, wouldn''t it be nice if Rails automatically saved the >> attributes of an object to the database when the validations fail? I suppose >> a gem could do it by monkey-patching validate or something like that and I''m >> also sure I''m not the first one to think of this. >> >> Does anybody know if that gem already exists? If not, I''ll give it a try. >> What do you think about this feature? Does it sound useful? >> > > > http://addons.heroku.com/tripwire > > "... Have you ever filled out a form only to have it rejected because of an > unexpected, overly-restrictive validation error? It''s frustrating and > annoying, and it probably happens to your users too. > > Tripwire shows you the validation errors your users are experiencing, > giving you a new way to uncover UX issues in your app. ..." > > Seems pretty much what you asked for. >Indeed it does. I don''t get it why it''s a Heroku addon and not just a simple plain gem. -- J. Pablo Fernández <pupeno-GAtDADarczzQT0dZR+AlfA@public.gmane.org> (http://pupeno.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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.