Skip to content

Commit 52bc653

Browse files
authored
fix(macros): throw original ValidationException with error bag in RequestMixin::validateWithBag() (#891)
Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com>
1 parent b21a809 commit 52bc653

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/RequestMixin.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,7 @@ public function validateWithBag()
379379
try {
380380
$this->validate($rules, ...$params);
381381
} catch (ValidationException $e) {
382-
$e->errorBag = $errorBag;
383-
throw new $e();
382+
throw $e->errorBag($errorBag);
384383
}
385384
};
386385
}

0 commit comments

Comments
 (0)