On 9 March 2011 03:40, Jim Ruther Nill <[email protected]> wrote: > On Wed, Mar 9, 2011 at 11:36 AM, Me <[email protected]> wrote: >> >> But is the validates_presence_of supposed to catch that first? >> > > ah ok, now i see what you mean. > validations don't work that way. all validations are run even when the > previous > validations fail. that's why you need to add :if and :except arguments so > that > some validations are run only when some conditions are met.
It's a very annoy feature of websites that tell you one error at a time: "secret phrase cannot be blank" so you enter a phrase... "secret phrase must be longer than 6 characters" so you frown and make it longer "secret phrase can only contain alpha-numeric characters" so you growl and remove the punctuation and tweak the phrase "secret phrase must be no longer than 20 characters" you shop elsewhere.. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

