The validates_timeliness gem says it supports I18n for its error messages. However, I can't find any configuration (or documentation) to show me how to modify the date format on error messages it generates.
There is a DEFAULT_ERROR_VALUE_FORMATS
in the gem's validator.rb
file. However, I don't want a global change -- I need to format error messages per locale.
I've tried adding the relevant I18n date format block to my application's config/locales
language files, like so:
en:
date:
formats:
default: "%d/%m/%Y"
However, that has no effect after server restart.
So my question: how can I apply a locale-specific date to the error messages that the validates_timeliness gem generates?