# Customizing error page

**URL:** <https://www.ruby-forum.com/t/customizing-error-page/134282>\
**Category:** Rails\
**Created:** [April 9, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/customizing-error-page/134282 "2008-04-09T14:15:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthikragu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a88e57/32.png) [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Post date:** [April 9, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/customizing-error-page/134282/1 "2008-04-09T14:15:33Z")

</div>

hi all,

```
       im having validations in my model so if i give wrong inputs

```

while creating new row error messages are coming but i want to change  
the way it looks and edit the error messages.the error message is  
comming in a red color box i want to change it.people know it please  
help me.

---

<div class="post-metadata">

**Author:** ![karthikragu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a88e57/32.png) [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Post date:** [April 9, 2008, 2:39pm UTC](https://www.ruby-forum.com/t/customizing-error-page/134282/2 "2008-04-09T14:39:40Z")

</div>

I am not sure if the response is this simplistic or not, but…  
Assuming you just mean the style of the message, not the text itself,  
just have a look at the css file for the page, which is under the  
\<RAILS\_DIR\>/public/stylesheets directory (or you could always hack it  
by altering the style for the div element holding the error message in  
the layout rhtml file, located in \<RAILS\_DIR\>/app/views/layouts).

/Brad.

---

<div class="post-metadata">

**Author:** ![karthikragu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a88e57/32.png) [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Post date:** [April 9, 2008, 3:08pm UTC](https://www.ruby-forum.com/t/customizing-error-page/134282/3 "2008-04-09T15:08:06Z")

</div>

ya i can able to edit the style of the display now but i want to edit  
the content inside too.like its showing “phone no is too short” i want  
to change it to something else.do u have idea for it.

---

<div class="post-metadata">

**Author:** ![karthikragu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a88e57/32.png) [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Post date:** [April 9, 2008, 3:11pm UTC](https://www.ruby-forum.com/t/customizing-error-page/134282/4 "2008-04-09T15:11:39Z")

</div>

On 9 Apr 2008, at 14:08, Karthikragunath B. wrote:

> ya i can able to edit the style of the display now but i want to edit  
> the content inside too.like its showing “phone no is too short” i want  
> to change it to something else.do u have idea for it.

You can pass the :message option to your validations.

Fred
