I realise there are many questions on this already but I can't find one with a solution to this issue.
I have a custom message set with my validation rule like this:
validates :grace, :inclusion => { :in => 1..7, :message => " should be between 1 and 7" }
and the validation error message will be
"Grace should be between 1 and 7"
but I don't want it to automatically use the name Grace as I want it to say Cancellation Period - so my question is how do I override this default behaviour?
EDIT
Here's my view code to display errors
<% if @object.errors.any? %>
<% @object.errors.full_messages.each do |msg| %>
<p class="error"><%= msg %></p>
<% end %>
<% end %>