I was thinking about this the other day.

There are a few validation rules I use in pretty much every
controller, such as 'required'. The following *should* work
(untested):

in AppModel:

var $rule['required'] = array(
    "rule"=>array("minLength", 1),
    "message"=>"cannot be blank",
    "required"=>true;
)

in foo model:

  var $validate = array(
    "name"=>$this->rule['required']
  )'

On Jun 30, 6:28 am, "Dave Maharaj :: WidePixels.com"
<[email protected]> wrote:
>  Just not sure how to go about it...
>
> How do I define them in app_model then relate them to each  model when
> needed.
>
>
>
> -----Original Message-----
> From: Miles J [mailto:[email protected]]
> Sent: June-30-09 2:53 AM
> To: CakePHP
> Subject: Re: Validate
>
> Well yes you could apply them in app model. Is that your main question?
--~--~---------~--~----~------------~-------~--~----~
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