mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-06 15:28:58 +01:00
Fixes #4611.
This commit is contained in:
@@ -197,13 +197,8 @@ class Validator extends Component
|
||||
$type = static::$builtInValidators[$type];
|
||||
}
|
||||
if (is_array($type)) {
|
||||
foreach ($type as $name => $value) {
|
||||
$params[$name] = $value;
|
||||
}
|
||||
$params = array_merge($type, $params);
|
||||
} else {
|
||||
if (!class_exists($type)) {
|
||||
throw new InvalidConfigException("Unknown validator: '$type'.");
|
||||
}
|
||||
$params['class'] = $type;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user