Throw validation (exception) from action

Can I throw an validation error / exception from an action and show it in the form?
Solution
Not tested but I feel like something like this should work (in your action) :
throw ValidationException::withMessages([
    'data.my_upload_field' => 'Custom error message here',
]);
Was this page helpful?