Skip to content
Discussion options

You must be logged in to vote

It was changed on 1e02bc2
For get old one back you have to create a class extending \Illuminate\Validation\ValidationException and overwrite the new code with the old one
and set that new custom class on validator with ->setException(CustomValidationException::class)

public function testCustomException()
{
$trans = $this->getIlluminateArrayTranslator();
$v = new Validator($trans, ['name' => ''], ['name' => 'required']);
$exception = new class($v) extends ValidationException {};
$v->setException($exception);
try {
$v->validate();
} catch (Val…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@henzeb
Comment options

@a-h-abid
Comment options

@erikn69
Comment options

@erikn69
Comment options

Answer selected by a-h-abid
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants