Skip to content

Commit fc63ec6

Browse files
Merge pull request #145 from utopia-php/fix-array-list-validator
fix: rearranging arraylist validators
2 parents d9aa291 + a2fa010 commit fc63ec6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Http/Validator/ArrayList.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,16 @@ public function isValid(mixed $value): bool
105105
return false;
106106
}
107107

108-
if ($this->length && \count($value) > $this->length) {
109-
return false;
110-
}
111-
112108
foreach ($value as $element) {
113109
if (!$this->validator->isValid($element)) {
114110
return false;
115111
}
116112
}
117113

114+
if ($this->length && \count($value) > $this->length) {
115+
return false;
116+
}
117+
118118
return true;
119119
}
120120
}

0 commit comments

Comments
 (0)