# Help on my validation

**URL:** <https://www.ruby-forum.com/t/help-on-my-validation/169148>\
**Category:** Rails\
**Created:** [May 30, 2009, 7:38am UTC](https://www.ruby-forum.com/t/help-on-my-validation/169148 "2009-05-30T07:38:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [May 30, 2009, 7:38am UTC](https://www.ruby-forum.com/t/help-on-my-validation/169148/1 "2009-05-30T07:38:55Z")

</div>

Hi…  
I use text field with auto complete for my authority\_name field which  
will be fetched from userinfo table and the field name is login.

Authority Name ------------  
\<%=text\_field\_with\_auto\_complete :userinfo, :login%\>

this authority name will be stored in company table.  
what my problem is i want to validate the above auto complete field…  
i tried the validates presence of it gets me error.  
i could not use as \<%=f.text\_field\_with\_auto\_complete :userinfo,  
:login%\>  
what is the reason…pls guide me…on the validation

Thanks
