of precedence and only show the first failed validation for a given
BTW, I know I can just roll my own validations or muck with the errors
object on the model, but I’m looking to see if there is a simpler,
recommended way to do this that I’ve overlooked.
You could always set :allow_blank => true on the validations (except
the validate_presence_of one of course). That way they won’t appear
unless the user has entered something.
Although, one could make an argument that if they screw up you should
let them know what you expect so they don’t have to do it again. I hate when a form tells me it’s too short, then it tells me it
doesn’t have a capital letter, then it tells me it doesn’t have a
number, then a symbol, then it complains that I can’t use 74 as it was
the year I was born, also ‘PH’ isn’t allowed, etc. etc. etc…
And while I’m complaining, for the love of whatever it is you love,
don’t make me enter a phone number using your pre-conceived notions
about formatting. Just take my 10 digits and format them yourself!