|
@@ -172,17 +172,17 @@ class Validator
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $rules[$name] = $rule ?? '';
|
|
|
- }
|
|
|
-
|
|
|
- if (isset($suffix)) {
|
|
|
if (
|
|
|
- isset($this->rules[$field]['array'])
|
|
|
- && ! \is_array($this->rules[$field]['array'])
|
|
|
+ 'array' === $name
|
|
|
+ && ! \is_array($rule)
|
|
|
) {
|
|
|
- $this->rules[$field]['array'] = [];
|
|
|
+ $rule = [];
|
|
|
}
|
|
|
|
|
|
+ $rules[$name] = $rule ?? '';
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isset($suffix)) {
|
|
|
$this->rules[$field]['array'][$suffix] = $rules;
|
|
|
} else {
|
|
|
$this->rules[$field] = $rules;
|