# Validation errrors: how to get rid of "Validation failed: " and the Objects in them

**URL:** <https://www.ruby-forum.com/t/validation-errrors-how-to-get-rid-of-validation-failed-and-the-objects-in-them/155277>\
**Category:** Rails\
**Created:** [December 10, 2008, 4:17am UTC](https://www.ruby-forum.com/t/validation-errrors-how-to-get-rid-of-validation-failed-and-the-objects-in-them/155277 "2008-12-10T04:17:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyanlion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f0a364/32.png) [@tyanlion](https://www.ruby-forum.com/u/tyanlion)\
**Post date:** [December 10, 2008, 4:17am UTC](https://www.ruby-forum.com/t/validation-errrors-how-to-get-rid-of-validation-failed-and-the-objects-in-them/155277/1 "2008-12-10T04:17:02Z")

</div>

Hi when ever i do

```
rescue Exception => e
flash[:error] = e.message

```

the e.message will always contain the “Validation error:” string and  
the Object

Example:

Validation failed: Price “message:”, Price “message”

How do i tell rails that I just want the message? and not the other  
parts of the validation error to be displayed?
