I found the cool new model::isUnique. It works great with
beforeValidate (as the example gave) but I can't get it to do anything
when I update a record.
Setting it to beforeSave doesn't help either.
What I sort of patched is:
if ( ! $this->Person->isUnique(array('name'=>$this->data['Person']
['name']))) {
.... etc. etc.
That works good in that I can trap the duplicate error ... but Cake
doesn't seem to know about that so no error message is set in the
form.
Now I've been trying to walk the whole trree of model and helpers to
($this->Person->validationErrors..., $this->Form->error... etc.) but
for the life of it, that error message stays hidden, lol.
Where does my logic go wrong?! :(
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---