# viewing validation errors

**URL:** <https://discuss.rubyonrails.org/t/viewing-validation-errors/2586>\
**Category:** rubyonrails-talk\
**Created:** [October 4, 2006, 3:08pm UTC](https://discuss.rubyonrails.org/t/viewing-validation-errors/2586 "2006-10-04T15:08:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh2](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@Josh2](https://discuss.rubyonrails.org/u/Josh2)\
**Post date:** [October 4, 2006, 3:08pm UTC](https://discuss.rubyonrails.org/t/viewing-validation-errors/2586/1 "2006-10-04T15:08:56Z")

</div>

i love how the validation works with AR on forms, but is there an easy way to customize that a little more? like the html that the errors are wrapped in?

also, is there a way to break it up if you want to show each error alongside the problem field, or with the helpers do you always have to keep everything in the same place?

---

<div class="post-metadata">

**Author:** ![Josh2](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@Josh2](https://discuss.rubyonrails.org/u/Josh2)\
**Post date:** [October 4, 2006, 3:14pm UTC](https://discuss.rubyonrails.org/t/viewing-validation-errors/2586/2 "2006-10-04T15:14:24Z")

</div>

sorry for not looking this one up first. i didn't think i would find it so easily.

i found this example on the Rails docs:

\<%= error\_message\_on "post", "title" %\> =\> &nbsp;&nbsp;&nbsp;&nbsp;\<div class="formError"\>can't be empty\</div\>

&nbsp;&nbsp;\<%= error\_message\_on "post", "title", "Title simply ", " (or it won't work)", "inputError" %\> =\> &nbsp;&nbsp;&nbsp;&nbsp;\<div class="inputError"\>Title simply can't be empty (or it won't work)\</div\>

---

<div class="post-metadata">

**Author:** ![Don\_Miguel\_de\_los\_Pl](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@Don\_Miguel\_de\_los\_Pl](https://discuss.rubyonrails.org/u/Don_Miguel_de_los_Pl)\
**Post date:** [October 4, 2006, 3:16pm UTC](https://discuss.rubyonrails.org/t/viewing-validation-errors/2586/3 "2006-10-04T15:16:37Z")

</div>

I usually just override the method error\_messages\_on.
