On Mar 30, 10:31 am, "Dia" <[EMAIL PROTECTED]> wrote:
> up
>
> to pass datas from controller to model I now do like that :
>
> // controller
> $this->User->data = $this->data;
> if ($this->User->validates()) { ... }
>
> // model
> function beforeValidate() {
> // can use $this->data
>
> }
>
> in beforeValidate I use a Sanitize object to clean datas
> but it changes model datas by accessing $this->data
> datas in the controller aren't modified
>
> how could I resolve it ?
> thanx
Save calls validate, do you need to call validate explicitly at all
(if so please clarify why)?
hth,
AD
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---