Fix Core\Validator for array

Restore the structure of the array according to the form validation rules.
This commit is contained in:
Visman 2020-11-19 16:05:30 +07:00
parent 19ca100b2d
commit c2f9164cc1

View file

@ -613,6 +613,11 @@ class Validator
$tmp1 = null;
$tmp2 = null;
$this->recArray($tmp1, $tmp2, $name, $rules, $field);
} elseif ('*' === $key) {
$result = []; // ???? а может там не отсутствие элемента, а не array?
} else {
$value[$key] = null;
$this->recArray($value[$key], $result[$key], $name, $rules, $field);
}
}
}