# AJAX error messages

**URL:** <https://www.ruby-forum.com/t/ajax-error-messages/143266>\
**Category:** Rails\
**Created:** [July 16, 2008, 9:31pm UTC](https://www.ruby-forum.com/t/ajax-error-messages/143266 "2008-07-16T21:31:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lancashire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/4af34b/32.png) [@lancashire](https://www.ruby-forum.com/u/lancashire)\
**Post date:** [July 16, 2008, 9:31pm UTC](https://www.ruby-forum.com/t/ajax-error-messages/143266/1 "2008-07-16T21:31:47Z")

</div>

Hi, a Rails newbie here.

I have an AJAX form which, upon submission, updates another part of  
the page using AJAX (with an .rjs). I would like to catch illegal  
submissions and display their corresponding error messages using AJAX.  
However, I am having trouble retrieving the error messages as they  
seem to be cleared at some stage - is there any way of passing them  
through, in params[] possibly? I would rather do my validations with  
Rails than JavaScript (which has been suggested elsewhere).

Any help would be much appreciated.

---

<div class="post-metadata">

**Author:** ![lancashire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/4af34b/32.png) [@lancashire](https://www.ruby-forum.com/u/lancashire)\
**Post date:** [July 16, 2008, 11:25pm UTC](https://www.ruby-forum.com/t/ajax-error-messages/143266/2 "2008-07-16T23:25:27Z")

</div>

Never mind, I was being stupid.
