Other than the conditional validation solution in the bakery, (which
seems to work, but is not necessarily a first choice, it's more of a
workaround) is there a more "core" approach to dealing with fields
which have different validation requirements for different forms?

The classic example is the login form vs. the registration form, both
of whose fields are validated against the user model.

Both forms have username and password, but on the registration form
other fields are also mandatory.

So, if we make, for example, the country field mandatory for the
registration form, it will also be mandatory for the login form, which
we don't want.

Each field in the model can have only one set of validation rules.
Perhaps what we really need is the capability for mutliple sets of
rules per field, with each set targetted to a form or action (as I saw
in an earlier post on this forum).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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