# ActiveRecord display different text for attribute on validation

**URL:** <https://www.ruby-forum.com/t/activerecord-display-different-text-for-attribute-on-validation/193802>\
**Category:** Rails\
**Created:** [August 24, 2010, 5:16pm UTC](https://www.ruby-forum.com/t/activerecord-display-different-text-for-attribute-on-validation/193802 "2010-08-24T17:16:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ntk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/48db29/32.png) [@ntk](https://www.ruby-forum.com/u/ntk)\
**Post date:** [August 24, 2010, 5:16pm UTC](https://www.ruby-forum.com/t/activerecord-display-different-text-for-attribute-on-validation/193802/1 "2010-08-24T17:16:09Z")

</div>

What is the best way to tell rails to output a different name in the  
validation presented to the user than the actual attribute?

I have a field “trade\_attached\_pdf”  
Which AR creates the error message “Trade attached pdf may only be in  
pdf  
format”

But I want the message to read “Attached pdf may only be in pdf format”

I found human\_attribute\_name in AR.base but is not clear how to  
implement. I  
have not done much with I18n, is that where I should perhaps be looking  
instead?

David
