Throw custom validation exception

PHOTO EMBED

Thu Aug 18 2022 13:21:26 GMT+0000 (Coordinated Universal Time)

Saved by @jeromew #laravel

// In the controller
throw Illuminate\Validation\ValidationException::withMessages([
    "one_thing" => ["Validation Message #1"], 
    "another_thing" => ['Validation Message #2']
]);
content_copyCOPY