Sometimes I want to show just one error, even when a field fails two or
A custom validation method is easy enough, but the helpers are nice and
So, has anyone found a way of doing this with AR’s validation helpers?
The :if/:unless look promising, but its made harder by validations being
applied in a random order.
P.s. The validatable gem has the excellent ‘level’ option on it’s
validation helpers. http://validatable.rubyforge.org/
“Validations can be given levels. If a validation fails on a level the
validations for subsequent levels will not be executed.”