When using model->validates($data), the lines of code that execute the
validation are:
foreach($this->validate as $field_name => $validator) {
if (isset($data[$field_name]) && !preg_match($validator,
$data[$field_name])) {
$this->invalidate($field_name);
}
}
the problem with this is that if the variables is not defined, is not
validated, something weird, because if i told that a variable has to
be "NOT_EMPTY" and is not defined no error is thrown.
This behaviour is normal and i have to defined the variable always or
as i think when the variables were not defined model has to mark them
as not valid?
Thanks!
Gonza
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---