Ben Jackson
2005-May-29 18:02 UTC
validates_length_of && validates_presence_of: Duplicate error messages?
validates_presence_of :login , :on => :create, :message => "Please enter a login." validates_length_of :login, :within => 3..40, :message => "Login must be a minimum of 3 characters." Right now if the login field is left blank, both these errors get thrown. I assume that setting a conditional for the first one if the second one is thrown, something like validates_length_of :login, :within => 3..40, :message => "Login must be a minimum of 3 characters.", :if => !:login? Using the patch from http://dev.rubyonrails.com/ticket/1324. Is this accurate? ___________________ Ben Jackson Diretor de Desenvolvimento ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org http://www.incomumdesign.com