I had the same problem : wanted to modify datas in beforeValidates and
see these changes in the form in validation failed

the topic I opened :
http://groups.google.com/group/cake-php/browse_thread/thread/7d9a099a72d079c5/599bacad094e8d3c?lnk=gst&q=lost&rnum=1#599bacad094e8d3c

this is my explaination, others may correct me if I'm wrong :
$this->data in beforeSave modifies $data of the model but in the form
you see $data of the controller

the only way I found to deal with it :
// controller :
if (!$this->MyModel->save($this->data)) {
  $this->data = $this->MyModel->data;
}

it works but I don't think this is a bad way of coding

if someone could tell about a proper way...


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

Reply via email to