# validates\_with needs parameter

**URL:** <https://discuss.rubyonrails.org/t/validates-with-needs-parameter/60160>\
**Category:** rubyonrails-docs\
**Created:** [August 2, 2011, 7:37am UTC](https://discuss.rubyonrails.org/t/validates-with-needs-parameter/60160 "2011-08-02T07:37:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimas](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@dimas](https://discuss.rubyonrails.org/u/dimas)\
**Post date:** [August 2, 2011, 7:37am UTC](https://discuss.rubyonrails.org/t/validates-with-needs-parameter/60160/1 "2011-08-02T07:37:35Z")

</div>

I read Active Record Validation section and tried to use validates\_with but i got number argument wrong error, [http://guides.rubyonrails.org/active\_record\_validations\_callbacks.html#validates\_with](http://guides.rubyonrails.org/active_record_validations_callbacks.html#validates_with)

when i looked into this doc, there is a parameter needed [http://api.rubyonrails.org/classes/ActiveModel/Validations/ClassMethods.html#method-i-validates\_with](http://api.rubyonrails.org/classes/ActiveModel/Validations/ClassMethods.html#method-i-validates_with)

I think the guide is not correct

---

<div class="post-metadata">

**Author:** ![radar](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/radar/32/604_2.png) [@radar](https://discuss.rubyonrails.org/u/radar)\
**Post date:** [August 15, 2011, 10:12pm UTC](https://discuss.rubyonrails.org/t/validates-with-needs-parameter/60160/2 "2011-08-15T22:12:27Z")

</div>

This is fixed in the latest changes. The guides will be updated when 3.1 is released.

Thanks for letting us know 🙂
