Fixing overriding of default messages

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4949 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-04-30 12:18:09 +00:00
parent 30a5f0384e
commit 2dd02aafba

View file

@ -1737,7 +1737,7 @@ class Model extends Overloadable {
}
if (!$valid) {
if (!isset($validator['message'])) {
$validator['message'] = ife(is_string($index) || (is_numeric($index) && $index > 0), $index, $message);
$validator['message'] = ife(is_string($index) || (is_numeric($index) && count($ruleSet) > 1), $index, $message);
}
$this->invalidate($fieldName, $validator['message']);