When i do this:
validates_presence_of :name, :email, :message => “Can’t be blank”
and use the “error_message_on” method in my view, i get the same
message for both “name” and “email” fields - Can’t be blank.
How do i specify a different message for each attribute without having
to write a custom validation message?
Passing a hash to the :message parameter would be great but it doesn’t
work:
validates_presence_of :name, :email, :message =>{:name => ‘name
message’, :email => ‘email message’}
Any thoughts?