# Validates\_presence\_of message

**URL:** <https://www.ruby-forum.com/t/validates-presence-of-message/124366>\
**Category:** Rails\
**Created:** [December 28, 2007, 2:31am UTC](https://www.ruby-forum.com/t/validates-presence-of-message/124366 "2007-12-28T02:31:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wheels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7bcc69/32.png) [@wheels](https://www.ruby-forum.com/u/wheels)\
**Post date:** [December 28, 2007, 2:31am UTC](https://www.ruby-forum.com/t/validates-presence-of-message/124366/1 "2007-12-28T02:31:48Z")

</div>

validates\_presence\_of :field\_name, :message =\> “message”; the  
message shows up with the :field\_name message concatenated.

how can i just show just the message and not the field\_name?

Thanks

---

<div class="post-metadata">

**Author:** ![wheels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7bcc69/32.png) [@wheels](https://www.ruby-forum.com/u/wheels)\
**Post date:** [December 28, 2007, 2:35am UTC](https://www.ruby-forum.com/t/validates-presence-of-message/124366/2 "2007-12-28T02:35:54Z")

</div>

You can’t, not using that syntax.

\<% If !@record.errors\_on(:field\_name).empty? %\>  
OH NOES!  
\<% end %\>

In your view, perhaps?

On Dec 28, 2007 12:00 PM, wheels [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> validates\_presence\_of :field\_name, :message =\> “message”; the  
> message shows up with the :field\_name message concatenated.
> 
> how can i just show just the message and not the field\_name?
> 
> Thanks
> 
> >

–  
Ryan B.

> **[frozenplague.net](http://www.frozenplague.net)**
>
> This domain may be for sale!

Feel free to add me to MSN and/or GTalk as this email.

---

<div class="post-metadata">

**Author:** ![wheels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7bcc69/32.png) [@wheels](https://www.ruby-forum.com/u/wheels)\
**Post date:** [December 28, 2007, 11:50am UTC](https://www.ruby-forum.com/t/validates-presence-of-message/124366/3 "2007-12-28T11:50:51Z")

</div>

wheels wrote:

> validates\_presence\_of :field\_name, :message =\> “message”; the  
> message shows up with the :field\_name message concatenated.
> 
> how can i just show just the message and not the field\_name?

One way is to install the custom-err-msg plugin  
– [http://rubyforge.org/projects/custom-err-msg/](http://rubyforge.org/projects/custom-err-msg/) –  
and prefix your message with a caret.

–  
We develop, watch us RoR, in numbers too big to ignore.
