Hi Guys,
I currently validating from my controllers using Model findBy*
methods. Usually using many different model queries inside one
controller. Something like this:
//get user object
$results = $this->User->findByEmail($this->data['User']['email']);
if ($results && $results['User']['password'] == md5($this->data['User']
['password'])) {
I want to start using cake 1.2 validation methods, where we stick most
of our validation inside our Model objects. Their we can define
custom rules to use for validation. My question is how do I use
$this->User->findByEmail
type of methods inside the model itself and using other models inside
models? Is their a way to do this or do I just keep using my
controller to validation certain things.
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---