Its not in front of me at the moment, but I can mock up what I mean.
array(
'Domain' => array(
'name' => 'Foo',
'parent_id' => '85'
),
'Owner' => array(
'color' => '#123456',
'clan_id' => '32'
)
)
This would be valid since clan_id (character_id, coterie_id & covenant_id
being the other valid choices) is set. My code handles this properly.
array(
'Domain' => array(
'name' => 'Foo',
'parent_id' => '85'
),
'Owner' => array(
'color' => '#123456',
'clan_id' => '32',
'character_id' => '71'
)
)
This would fail because the Owner object has both a character and a clan
assigned to it and it can only have one for my purposes. My code also
handles this situation properly.
array(
'Domain' => array(
'name' => 'Foo',
'parent_id' => '85'
),
'Owner' => array(
'color' => '#123456'
)
)
This should fail because I need atleast one of the four link id's to be
present, but because none of the 4 field id's isn't present in the dataset,
the rule isn't run. Normally you would just tell the field that its
required which would force it to throw an error if its empty, but being
empty isnt an issue if one of the other fields has data.
I can add and subtract rules from what I read in that docs, but they still
will not run if there isnt any data to trigger them.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php