Throughout my application i have about 100 various input fields in forms.
Most use the same validation rules max min alphanumeric and so on
Is it possible to define a set of validation rules in app_model that can be
used in the other models rather than adding the same rules over and over to
every model?
Example
'program' => array(
'rule' => 'alphaNumeric',
'message' => 'Must only contain letters and numbers.'
),
could that be defined as $alphaNumRule in app_model and in the model calling
validation use something like
'program' => array(
'rule' => $alphaNumRule,
),
Or something similar to that?
Dave
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---