'rule' => 'orNullMethod'
function orNullMethod($data, )
{
list($key => $val) = $data;
if (empty($val)
{
$this->data[$this->name][$key] = null;
}
return true;
}
On Sun, Mar 9, 2008 at 10:09 AM, mclight <[EMAIL PROTECTED]> wrote:
>
> Hi, all!
> How can I set the default value, by validating field.
> ex: I have a chapter field, and text field.....
> if chapter is not validated, then i want to set chapter to NULL. how
> can i do it?
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---