# Custom error messages

**URL:** <https://www.ruby-forum.com/t/custom-error-messages/163241>\
**Category:** Rails I18n\
**Created:** [March 18, 2009, 4:13pm UTC](https://www.ruby-forum.com/t/custom-error-messages/163241 "2009-03-18T16:13:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![s-andringa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@s-andringa](https://www.ruby-forum.com/u/s-andringa)\
**Post date:** [March 18, 2009, 4:13pm UTC](https://www.ruby-forum.com/t/custom-error-messages/163241/1 "2009-03-18T16:13:11Z")

</div>

I’ve been trying to have a translated custom error message for when the  
format of a user’s email address is invalid.

I’m running rails 2.2.2 and trying to save the translations to the key  
activerecord.errors.models.user.attributes.email.invalid doesn’t work…  
it just uses to default message.

Is this something of a later release?

---

<div class="post-metadata">

**Author:** ![s-andringa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@s-andringa](https://www.ruby-forum.com/u/s-andringa)\
**Post date:** [March 18, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/custom-error-messages/163241/2 "2009-03-18T16:15:12Z")

</div>

Sjoerd A. wrote:

> I’ve been trying to have a translated custom error message for when the  
> format of a user’s email address is invalid.
> 
> I’m running rails 2.2.2 and trying to save the translations to the key  
> activerecord.errors.models.user.attributes.email.invalid doesn’t work…  
> it just uses to default message.
> 
> Is this something of a later release?

This seems to be the problem:  
[http://www.ruby-forum.com/topic/179273](http://www.ruby-forum.com/topic/179273)
