Just a quick thought without really looking into it: try prepending
the fields with the model name viz: Something.date_operational

L

On Feb 16, 4:00 pm, WebbedIT <p...@webbedit.co.uk> wrote:
> Hi,
>
> Can anyone spot what I am doing wrong?  I have read the book and a few
> blog articles on this and think I have everything setup right but
> can't get validation to apply more than one rule to a field (processes
> first rule, ignores the rest).
>
> Here is my validate declaration for the field in question
>
>   var $validate = array(
>     ...
>     'date_operational' => array(
>       'notFuture' => array(
>         'rule' => array('__validateDateNotFuture'),
>         'allowEmpty' => true,
>         'message' => 'Cannot be a future date'
>       ),
>       'statusDependancy' => array(
>         'rule' => array('__validateDependancy', array(
>           'conditions' => array(
>             'status_id' => array('673')
>           )
>         )),
>         'message' => 'Required for operational schemes'
>       )
>     ),
>     ...
>   );
>
> Both rules have been tested by removing the other and work perfectly,
> but as soon as I add them both it only applies the first rule ... I
> have tried echo debug($this->Scheme-.validate) to double check y
> formatting it it looks good to me.
>
> Paul.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to