Reputation: 1527
I know that custom error message can be added in locale .yml file like this:
errors:
models:
user:
attributes:
name:
blank: "The field is required"
How do I change error blank message for all the models at a time?
Upvotes: 1
Views: 1027
Reputation: 52357
What you look for is:
I18n.t('errors.messages.blank')
So to override it you can go with:
en:
errors:
messages:
blank: "custom message"
Upvotes: 3