Hi all, I am having a problem with the invalidate function. I am invalidating a field before saving but the form is still saving. Here's the relevant code.
I also checked the content of $this->Person before saving and invalidate did make an entry in it. Any ideas? $duplicate = $this->Person->hasAny( array( 'Person.first_name' => $this->params['data']['Person']['first_name'], 'Person.last_name' => $this->data['Person']['last_name'] ) ); if ($duplicate) { $this->Person->invalidate('first_name'); } if ($this->Person->save($this->data)) { $this->Session->setFlash('Your person has been saved.'); $this->redirect('/people'); } else { $this->set('data', $this->params['data']); $this->render(); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---