eee
This commit is contained in:
@@ -64,6 +64,9 @@ class Binding implements RequestFilterInterface
|
|||||||
{
|
{
|
||||||
// TODO: Implement dispatch() method.
|
// TODO: Implement dispatch() method.
|
||||||
$array = [];
|
$array = [];
|
||||||
|
if (count($this->rules) < 1) {
|
||||||
|
return $array;
|
||||||
|
}
|
||||||
foreach ($this->rules as $key => $rule) {
|
foreach ($this->rules as $key => $rule) {
|
||||||
if (is_string($key)) {
|
if (is_string($key)) {
|
||||||
$array[] = $this->getValidator($key, $rule);
|
$array[] = $this->getValidator($key, $rule);
|
||||||
@@ -91,7 +94,7 @@ class Binding implements RequestFilterInterface
|
|||||||
if (is_numeric($key)) {
|
if (is_numeric($key)) {
|
||||||
$class = self::TYPES[$rule];
|
$class = self::TYPES[$rule];
|
||||||
} else {
|
} else {
|
||||||
$class = array_merge(self::TYPES[$key], ['value' => $rule, 'field' => $key]);
|
$class = array_merge(self::TYPES[$key], ['value' => $rule, 'field' => $key]);
|
||||||
}
|
}
|
||||||
$isFirst = false;
|
$isFirst = false;
|
||||||
if ($class['class'] === RequiredValidatorFilter::class) {
|
if ($class['class'] === RequiredValidatorFilter::class) {
|
||||||
|
|||||||
Reference in New Issue
Block a user