better exception message for non existing validator

This commit is contained in:
Carsten Brandt
2014-05-07 13:09:39 +02:00
parent 15c5f94f80
commit b65b0ce591

View File

@ -193,6 +193,9 @@ class Validator extends Component
$params[$name] = $value;
}
} else {
if (!class_exists($type)) {
throw new InvalidConfigException("Unknown validator: '$type'.");
}
$params['class'] = $type;
}
}