🛤️ Ruby on Rails - Error Translations
Error Translations
Updated at 2015-09-05 23:28
Just a full list of Ruby on Rails errors that come from default form helpers.
# Shared errors translations.
# From:
# https://github.com/rails/rails/blob/master/activemodel/lib/active_model/locale/en.yml
# https://github.com/rails/rails/blob/master/activerecord/lib/active_record/locale/en.yml
en:
activerecord:
errors:
template:
header:
one: "An error prohibited %{model} from being saved."
other: "%{count} errors prohibited %{model} from being saved."
body: "There were problems with the following fields:"
messages:
record_invalid: "Validation failed: %{errors}"
restrict_dependent_destroy:
has_one: "Cannot delete record because a dependent %{record} exists"
has_many: "Cannot delete record because dependent %{record} exist"
errors:
format: "%{attribute} %{message}"
messages:
required: "must exist"
taken: "has already been taken"
model_invalid: "Validation failed: %{errors}"
inclusion: "is not included in the list"
exclusion: "is reserved"
invalid: "is invalid"
confirmation: "doesn't match %{attribute}"
accepted: "must be accepted"
empty: "can't be empty"
blank: "can't be blank"
present: "must be blank"
too_long:
one: "is too long (maximum is 1 character)"
other: "is too long (maximum is %{count} characters)"
too_short:
one: "is too short (minimum is 1 character)"
other: "is too short (minimum is %{count} characters)"
wrong_length:
one: "is the wrong length (should be 1 character)"
other: "is the wrong length (should be %{count} characters)"
not_a_number: "is not a number"
not_an_integer: "must be an integer"
greater_than: "must be greater than %{count}"
greater_than_or_equal_to: "must be greater than or equal to %{count}"
equal_to: "must be equal to %{count}"
less_than: "must be less than %{count}"
less_than_or_equal_to: "must be less than or equal to %{count}"
other_than: "must be other than %{count}"
odd: "must be odd"
even: "must be even"