You will need to apply the validation rules in the Category and Scene
models or in the beforeFilter of the model in which you are running
the add/edit actions you can add

    $this->ModelName->Category->validate = array(
      'Category' => array(
        'rule' => array('multiple', array('min'=>1)),
        'message' => 'Select one or more categories'
      )
    );
    $this->ModelName->Scene->validate = array(
      'Scene' => array(
        'rule' => array('multiple', array('min'=>1)),
        'message' => 'Select one or more scenes'
      )
    );

You will probably find that the rules are still ignored and I think
this is down to saveAll not validating HABTM data before saving it.
To get around this I edited the core /cake/libs/model/model.php
(details earlier in the thread), but I am far from an expert, so not
sure if this is the right thing to do or the right way to go about
it.

As yet no-one who knows better has taken part in the conversation to
confirm if my suspicion about saveAll is right?!?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to