I know I have written this before, but now I cannot find it. I want to make sure that my input doesn''t contain ''Other...''. I know there''s some lookbehind regex that can get that, but I have had nothing but errors when I try to use it in a validates_format_of block. Any suggestions? Thanks, Walter -- 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.
Walter Lee Davis
2010-Oct-14 16:46 UTC
Re: Validate that input doesn''t contain default text?
And I''m using Ruby 1.8.7, which does not include lookbehind regex, come to find. Walter On Oct 14, 2010, at 12:40 PM, Walter Lee Davis wrote:> I know I have written this before, but now I cannot find it. I want > to make sure that my input doesn''t contain ''Other...''. I know > there''s some lookbehind regex that can get that, but I have had > nothing but errors when I try to use it in a validates_format_of > block. Any suggestions? > > Thanks, > > Walter > > -- > 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 > . > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Oct-14 17:32 UTC
Re: Validate that input doesn''t contain default text?
Walter Davis wrote in post #950212:> I know I have written this before, but now I cannot find it. I want to > make sure that my input doesn''t contain ''Other...''. I know there''s > some lookbehind regex that can get that, but I have had nothing but > errors when I try to use it in a validates_format_of block. Any > suggestions? > > Thanks, > > WalterWrite your own validation method that tests that the string doesn''t match /Other\.\.\./. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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.