Thank you for the answers. Could you show me any example please. On Jun 11, 2:02 pm, euromark <dereurom...@googlemail.com> wrote: > yeah > thats actually one of the downsites of cake's validation rule settings > at least in the default way > > using __construct() you can achieve more dynamically created rules > > On 11 Jun., 05:35, "Dr. Loboto" <drlob...@gmail.com> wrote: > > > 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 <dmitr...@gmail.com> 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en