You can always pass in array('validate' => false) during a save to
bypass all validation rules.
So in your admin_edit() action you would could use:
$this->save($this->data, array('validate' => false));
Be advised you're database restrictions will still be in place (eg.
can't put strings in INT fields, etc...)
Hope that helps,
Nick
On Mar 9, 4:23 am, "[email protected]"
<[email protected]> wrote:
> For example if I am superadmin I would can edit and add data even if I
> don't respect the valdation rule.
> So I will have views like superadmin_add,superadmin_edit where I
> disable validation rule
>
> On 9 Mar, 11:18, WebbedIT <[email protected]> wrote:
>
> > The answer depends on exactly what you're doing at the time.
>
> > Within your validation rules you can specify if the rule applies on
> > add or edit.
>
> > Or you can alter the models validation array from with the controller
> > by calling unset($this->ModelName->validate['fieldName']); or
> > something similar.
>
> > Also, by not including the field in the data array cake will not try
> > to validate it.
>
> > Which one to use depends on what it is you're trying to do.
>
> > HTH
>
> > Paul
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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