# Partial-Form validation from multiple pages (f.e. login-partial)

**URL:** <https://www.ruby-forum.com/t/partial-form-validation-from-multiple-pages-f-e-login-partial/164769>\
**Category:** Rails\
**Created:** [April 5, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/partial-form-validation-from-multiple-pages-f-e-login-partial/164769 "2009-04-05T17:54:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LpLpLp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@LpLpLp](https://www.ruby-forum.com/u/LpLpLp)\
**Post date:** [April 5, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/partial-form-validation-from-multiple-pages-f-e-login-partial/164769/1 "2009-04-05T17:54:04Z")

</div>

Hello - hard question:

I have my login-partial in my application.html.erb-layout.

Now I want to validate it, if the user pushes the submit button and  
show error-messages for it, if e.g. the passwordfield is empty.

But how do I do that? For getting the error messages, I must use

render :action =\> ‘create’

But there I have to know, from which action I came from. Beside  
different pages, need different seperate instance variables (which  
arn’t reproduced with render :action).

Second try with

redirect\_to :back

looses the errors-array…!

How can I solve this problem? Found nothing in the net =(  
Beside: I’m using restful\_authentication-plugin

HEEELP!
