仅供参考,如果您将这些包含在旧式哈希格式中,请使用它;
:activerecord => {
:errors => {
:template => {
:body => 'There were problems with the following fields',
:header => {
:one => '1 error prohibited this {{model}} from being saved',
:other => "{{count}} errors prohibited this {{model}} from being saved"
}
},
:messages => {
:inclusion => "is not included in the list",
:exclusion => "is reserved",
:invalid => "is invalid",
:confirmation => "doesn't match confirmation",
:accepted => "must be accepted",
:empty => "can't be empty",
:blank => "can't be blank",
:too_long => "is too long (maximum is {{count}} characters)",
:too_short => "is too short (minimum is {{count}} characters)",
:wrong_length => "is the wrong length (should be {{count}} characters)",
:taken => "has already been taken",
:not_a_number => "is not a number",
: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}}",
:odd => "must be odd",
:even => "must be even"
}
}
}