set() is called from within save() before validation. If you need to
call validates() yourself, you must first set the data.

http://book.cakephp.org/view/410/Validating-Data-from-the-Controller
http://api.cakephp.org/view_source/model/#line-1094

On Thu, Apr 9, 2009 at 10:05 AM, Rhee <[email protected]> wrote:
>
> Maybe I am just too idiot to understand this.
> I know what $this->Model->set() do. But I used for adding a new data
> set in database. Also, it has no ID / primary key yet, by the time i
> called set() method. So what did set() do, so that validate() can be
> called properly after that?
>
> On Apr 9, 3:52 pm, brian <[email protected]> wrote:
>> On Thu, Apr 9, 2009 at 8:06 AM, Rhee <[email protected]> wrote:
>>
>> > Next question, why is it now working? What did $this->Model->set() do?
>> > Can you gimme short explanation?
>>
>> It sets the Primary Key for the model and $Model->data values.
>>
>> http://api.cakephp.org/class/model#method-Modelset
> >
>

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