Displaying 1 result from an estimated 1 matches for "occurs_on".
2006 Apr 22
4
How to supress field name in error message?
Hi
How do I supress the reporting of a field name in the full error
message? I want the error to be associated with the field so that the
.fieldWithErrors class is applied to the field but I don''t want it to
add the field name to the actual error message.
For example:
errors.add("occurs_on", "The date can''t be today!") unless occurs_on
!= Date.today
I would like the error to read:
The date can''t be today!
Rather than:
Occurs on The date can''t be today!
Is there any way to do this?
Thanks in advance
Dave