I'm trying to find out if you can use this against an array, where if
it's equal to any option in the array it validates. I don't see
anything on this, and it doesn't seem to work when I try it. Is there
any other cake way to check if it's equal to an item in an array?

Here is what I have in my model:

'field' => array(
            'notempty' => array(
                'rule' => array('equalTo', array('option1', 'option2',
'option3')),
                'message' => 'Please select an option'
            )
)

where 'field' is a select field that doesn't exist in the database.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to