mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
better exception message for non existing validator
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user