Skip to content

Commit 21f1a8b

Browse files
committed
Allow static validator to run before prompt's validator.
1 parent d474c3a commit 21f1a8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Prompt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ private function validate(mixed $value): void
403403
}
404404

405405
$error = match (true) {
406-
is_callable($this->validate) => ($this->validate)($value),
407406
isset(static::$validateUsing) => (static::$validateUsing)($this),
407+
is_callable($this->validate) => ($this->validate)($value),
408408
default => throw new RuntimeException('The validation logic is missing.'),
409409
};
410410

0 commit comments

Comments
 (0)