Merge pull request #718 from dereuromark/2.3-fix-validation-error-message

2.3 fix validation error message
This commit is contained in:
Mark Story 2012-07-17 19:57:16 -07:00
commit 83cef3ef9a

View file

@ -274,7 +274,7 @@ class CakeValidationRule {
$this->_valid = call_user_func_array(array('Validation', $this->_rule), $this->_ruleParams);
} elseif (is_string($validator['rule'])) {
$this->_valid = preg_match($this->_rule, $data[$field]);
} elseif (Configure::read('debug') > 0) {
} else {
trigger_error(__d('cake_dev', 'Could not find validation handler %s for %s', $this->_rule, $field), E_USER_WARNING);
return false;
}