Hello,

Can you provide more information about how you are using save() in your
controllers?

The model-defined validation rules that apply automatically to save() would
usually be used in an insert or update operation. Presumably, the signup
action you describe would be in this category.

However a more abstract action like a login, which presumably does a select
operation and compares the fields wouldn't be likely to use save().

rhett waldock
clearsite new media

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of cecplex
Sent: Tuesday, March 06, 2007 4:09 PM
To: Cake PHP
Subject: Different Validations on 1 Table (Model) Based on the Action


I'm very new to CakePHP, I've only worked with it for a day or so now.
However, I'm confused as to how validation is handled when you want to
perform different actions.

For example:

I have a login form that has a username and password required field.
THEN I have a Signup form that has a username and password and
firstname, lastname, email and other fields.

When I run the save(); function from my controllers, i want it to
validate differently based on the action. (Either a signup or a login)

Can someone explain this a bit more?






--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to