Skip to content

Commit eb5fa57

Browse files
authored
fix file validator not work (#25)
fix file validator not work
2 parents 159aa63 + 6f9d0b4 commit eb5fa57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ValidationTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ protected function fieldValidate(string $field, $value, string $validator, array
332332

333333
// File resource check
334334
} elseif (self::isCheckFile($validator)) {
335-
$passed = $this->$validator($field, ...array_values($args));
335+
$method = "{$validator}Validator";
336+
$passed = $this->$method($field, ...array_values($args));
336337

337338
// other required* methods
338339
} elseif (method_exists($this, $validator)) {

0 commit comments

Comments
 (0)