> 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']
> )'
Oh dear..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment