# Rails validation model

**URL:** <https://discuss.rubyonrails.org/t/rails-validation-model/4596>\
**Category:** rubyonrails-talk\
**Created:** [November 16, 2006, 5:37am UTC](https://discuss.rubyonrails.org/t/rails-validation-model/4596 "2006-11-16T05:37:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farhad1](https://avatars.discourse-cdn.com/v4/letter/f/fbc32d/32.png) [@Farhad1](https://discuss.rubyonrails.org/u/Farhad1)\
**Post date:** [November 16, 2006, 5:37am UTC](https://discuss.rubyonrails.org/t/rails-validation-model/4596/1 "2006-11-16T05:37:55Z")

</div>

I'm quite new to Rails, and I'm somewhat confused by the Rails validation model, which seems to only be triggered on update or save/create. To me, you also want validation at the form level, even if the item is not being saved. For example, during registration you want to take the username and password and make sure they're not empty (or that password has certain restrictions), but during login you don't create anything, yet want to make sure that the form fields are filled. Can you use RoR's validation model or do you have to structure that manually in the the controller or model as a separate method? Seems odd but I can't seem to find any references that show how to do this easily.

thx
