either http://book.cakephp.org/view/1152/Core-Validation-Rules#multiple-1170 or http://book.cakephp.org/view/1152/Core-Validation-Rules#inList-1171
its all in the book On 12 Mai, 22:20, Tilen Majerle <[email protected]> wrote: > i think there is not pre defined validation check, but you can create > yourself > > check this link:http://book.cakephp.org/view/1179/Custom-Validation-Rules > > -- > Lep pozdrav, Tilen Majerlehttp://majerle.eu > > 2011/5/12 taro uma <[email protected]> > > > > > > > > > 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 sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php -- 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
