| Subject: | Re: Models problem |
|---|---|
| From: | Tilen Majerle |
| Date: | Mon, 20 Sep 2010 21:36:57 +0200 |
|
emm...before u call $this->ModelName->validates() you need to set the data for validation...so do something like this: {{{ $this->ModelName->set($this->data); $validate = $this->ModelName->validates(); //will return true or false
}}} and if u have something like that with associated models maybe....then do this {{{
$this->ModelName->ModelName2->set($this->data);
$validate = $this->ModelName->ModelName2->validates(); //will return true or false and only check data for ModelName2
}}} -- Tilen Majerle 2010/9/19 newbie <lunet1011@xxxxxxxxx> Hi. I was trying to debug an issue where whenever I perform $this- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/cake-php?hl=en |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | SQL executed behind CakePHP without joins, paulocl |
|---|---|
| Next by Date: | Re: SQL executed behind CakePHP without joins, cricket |
| Previous by Thread: | Models problem, newbie |
| Next by Thread: | seo, index.php and rewrite, pastomano |
| Indexes: | [Date] [Thread] [Top] [All Lists] |