Created
May 14, 2021 19:19
-
-
Save allaniftrue/94869006b29a6569923d9c2e37376005 to your computer and use it in GitHub Desktop.
Laravel Throw custom 422 error message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Validation\ValidationException; | |
throw ValidationException::withMessages(['field_name' => 'This value is incorrect']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment