# Validating user inputs in the controller

**URL:** <https://www.ruby-forum.com/t/validating-user-inputs-in-the-controller/108716>\
**Category:** Rails\
**Created:** [July 6, 2007, 8:55am UTC](https://www.ruby-forum.com/t/validating-user-inputs-in-the-controller/108716 "2007-07-06T08:55:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unnikrishnanes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/ce73a5/32.png) [@unnikrishnanes](https://www.ruby-forum.com/u/unnikrishnanes)\
**Post date:** [July 6, 2007, 8:55am UTC](https://www.ruby-forum.com/t/validating-user-inputs-in-the-controller/108716/1 "2007-07-06T08:55:00Z")

</div>

Is there any way that I can validate user inputs [forms field values]  
in the controller instead of model? Or which is the best way for  
validation.

Please suggest

---

<div class="post-metadata">

**Author:** ![unnikrishnanes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/ce73a5/32.png) [@unnikrishnanes](https://www.ruby-forum.com/u/unnikrishnanes)\
**Post date:** [July 6, 2007, 9:38am UTC](https://www.ruby-forum.com/t/validating-user-inputs-in-the-controller/108716/2 "2007-07-06T09:38:32Z")

</div>

you can validate in the controller by rolling your own validations if  
you really wanted. But unless you’re doing something out of the  
ordinary, you should keep your validations in the model, where they  
belong.

Mike
