# Why are both of these validations not working?

**URL:** <https://www.ruby-forum.com/t/why-are-both-of-these-validations-not-working/119093>\
**Category:** Rails\
**Created:** [November 3, 2007, 1:31am UTC](https://www.ruby-forum.com/t/why-are-both-of-these-validations-not-working/119093 "2007-11-03T01:31:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisolsen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c6cbf5/32.png) [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Post date:** [November 3, 2007, 1:31am UTC](https://www.ruby-forum.com/t/why-are-both-of-these-validations-not-working/119093/1 "2007-11-03T01:31:51Z")

</div>

validates\_presence\_of :region, :if =\> [“CA”, “US”].include?(:country)  
validates\_presence\_of :region, :if =\> Proc.new { |a| [“CA”,  
“US”].include?(a.country) }

The top one works, but the bottom does not. Obviously the top is  
easier to read, but I am just curious to why the bottom one returns  
false.

Thanks
