Of course you get syntax error. Only constants can be used in class definition.
You can overload model constructor and setup $validate there. On Jun 11, 8:22 am, Dmitry Shevchenko <[email protected]> wrote: > Hi > Did someone tried to create a array for the "inList" validation and > then use it? > for example > var $test = array('one_day', 'five_days','never'); > > var $validate = array( > 'ty_id' => array('numeric'), > 'date_arr' => array('allowed_data' => array( > 'rule' => array('inList', $test), > 'message' => 'Wrong data', > 'allowEmpty' => false) > ), > ); > > When I'm try to use this construction . I'm getting a syntax error > > Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
