Danimal wrote: > Hello! > > Has anyone come across a nice, elegant way to handle multiple > validation failures on a single field? For example... in the typical > login, you might have an email field that has three validations: not > blank, less than a max length and matches a format regex. But if I > submit the login/signup form with a blank I get back: > > # Email address is too short (minimum is 6 characters) > # Email address should look like an email address. > # Email address can't be blank > > I'd rather be able to specify (cleanly and easily) on a model some > kind of order of importance and then only show the first validation > failure for that field.
Why? As a user, I find it extremely annoying when I fix one validation error, submit the form, and get shown a different error. I'd rather see all the validation errors at once so I can fix them all at the same time. > > Thoughts? Advice? Don't do that. :) > > TIA! > > -Danimal Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.