I'm trying to doo some custom validation in a controller.

Code:

if (!empty($this->data))
{
   "check some things"

  if "check failed"
     $this->Item->invalidate('field that failed');

   if ($this->Item->save($this->data) {
   }

}

The Item gets saved regardless the check failes or not. While the
manual clearly says that "save will automatically validate the data
before actually saving".

There are quite some posts here that address this issue, but I can't
figure out how to get it working.

In addition to that: Would it be possible to add an error message for
the invalidation?
--~--~---------~--~----~------------~-------~--~----~
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