As far as I know, you can invalidate in controller just by calling
$this->YourModel->invalidate(...)

Does that help?

On Oct 16, 11:38 pm, cem <[EMAIL PROTECTED]> wrote:
> Hi ;
>
>   I am trying to build a freelancer script with cakephp . I made
> categories and projects. One project can have more than one category
> so I set the relationship of categories and projects to habtm . I hope
> everything is right until here because I spend really a big time for
> that . Anyway . Now the problem is I want to limit the maximum
> category checkbox a user can check . How can I validate that data .
>
>  Some ideas  :
>
>       I can get the count of the $this->data['categories']
> ['categories'] in the projects controller before saving data . But the
> thing is I have to set the validation error and stop the form from
> submitting . I cannot do this in a controller does anyone knows how ?
>        Or can I validate project categories in project model ?
--~--~---------~--~----~------------~-------~--~----~
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