Sorry for the delayed response, the working validation role that I
used was

    var $validate = array(
      'Role' => array(
        'rule' => array('multiple', array('min'=>1)),
        'message' => 'Select one or more roles'
      )
    );

This works with my RolesStaff model with form fields using the format
of:

  data[Role][Role][]

This is all as per the standard conventions of cake ... the main
problem I found was that saveAll() does not validate HABTM models
before saving.  I had to add a hack to get it to do so, see above.

I would not recommend my hack as I very much doubt it's the right way
to do it, even though it works.  I was hoping someone more
knowledgeable than me would join in the thread to shed some light on
the saveAll -> HABTM -> validation issue.

HTH, Paul (Webbed IT)
--~--~---------~--~----~------------~-------~--~----~
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