I agree with Steve, when we call valid?, we expect all validations to run. If you want to skip some validation in case errors already exist in the object for any particular reason, you can always to that as you said: `if errors.empty?`. This will give you the behavior you expect, although I'd recommend avoiding this and running all validations.
-- At. Carlos Antonio On Thursday, June 21, 2012 at 9:51 AM, Steve Klabnik wrote: > I think I'd be much more annoyed by this kind of behavior. "Okay, > these two things are wrong. Let's fix them. Wait, now it's _still_ > wrong, with something totally unrelated?" > > You could fix this case almost trivially by 'if age.to_i < 16', right? > I mean, I know you're talking about a more general case, but... > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com > (mailto:rubyonrails-core@googlegroups.com). > To unsubscribe from this group, send email to > rubyonrails-core+unsubscr...@googlegroups.com > (mailto:rubyonrails-core+unsubscr...@googlegroups.com). > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.