I originally thought the same thing as you David. It seems
instinctive that only the fields being saved should be validated.
However, looking into the model.php file of the core shows that ALL
fields are in fact being validated, even if only one or several fields
are being updated.
Specifically, the following if-condition stands out within the save()
function. Note how it doesn't validate some fields; instead it
validates all fields. This is confirmed by verifying the
functionality of the validates() function as well, which in turn calls
invalidFields() without specifying specific fields for validation.
if ($options['validate'] && !$this->validates()) {
$this->whitelist = $_whitelist;
return false;
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---