Hi,

maybe I'm a bit dull but I can't figure out what I'm doing wrong here. 
Maybe someone can help:

I've got two models: Foo HABTM Bar.

In foo_controller, add method I do this:

$bar = $this->Foo->Bar->find('list');
$this->set(compact('bar));

In the foo/add view I have:
$form->input('Bar', array('multiple' => 'checkbox'))

Which works as I expected.

Now I want to validate the checkboxes.

In models/bar.php I added
var $validate = array('Bar' => array('rule' => 'testRule'));

function testRule() {
   debug ("test");
   die();
}


In foo_controller, add method I tried this:
$this->Foo->save($this->data)
and this:
$this->Foo->saveAll($this->data)
and this:
$this->Foo->saveAll($this->data, array('validate' => 'first'))

All my other validation rules in the Foo-model work perfectly but the 
rule in Bar doesn't seem to be triggered.

Where is my mistake?
Any hints?

Regards
Guenther





--~--~---------~--~----~------------~-------~--~----~
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