# Validation messages without field names?

**URL:** <https://www.ruby-forum.com/t/validation-messages-without-field-names/147506>\
**Category:** Rails\
**Created:** [September 2, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/validation-messages-without-field-names/147506 "2008-09-02T16:04:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![polarapfel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/958977/32.png) [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Post date:** [September 2, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/validation-messages-without-field-names/147506/1 "2008-09-02T16:04:18Z")

</div>

Hi everybody,

I am getting involved deeper and deeper with Rails development and  
basically I love it. However, as Rails was born in the English  
language world, I find it rather demanding to develop with other end  
user languages in mind. One of the issues I’m having is with  
validation error messages.

I know how to create custom error messages for validation errors in  
the models. However, these messages get appended behind the validated  
field name which isn’t necessarily human readable or in the  
application end user language.

How do I get rid of model field names in the validation error  
messages?

Just to be very clear this is an example:

Say there is a field ‘name’ in the table ‘users’ and I validate ‘name’  
in ‘User’ I get validation error messages like these:

‘Name can’t be empty.’

I can only replace the ‘can’t be empty.’ part. How Do I get rid if  
‘Name’ in the error message?

Thanks,

Tobias W.

---

<div class="post-metadata">

**Author:** ![polarapfel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/958977/32.png) [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Post date:** [September 2, 2008, 4:24pm UTC](https://www.ruby-forum.com/t/validation-messages-without-field-names/147506/2 "2008-09-02T16:24:53Z")

</div>

There is built in support for this in soon to be released 2.2 (Rails  
edge). You can read about it here  
[http://iain.nl/2008/09/translating-activerecord/](http://iain.nl/2008/09/translating-activerecord/)

/Erik
