When I throw an ValidationException::withMessages error, it doesn't feed the Form:error
How to reproduce
Create a Form
Create a listener and hook it on Statamic\Events\FormSubmitted
Throw an error in the handle
class FormSubmittedListener
{
public function handle(object $event)
{
throw ValidationException::withMessages(['name' => 'You did something wrong.']);
}
}
Submit the form, as the documentation said, you should see the error in the form
Bug description
When I throw an
ValidationException::withMessages
error, it doesn't feed the Form:errorHow to reproduce
Statamic\Events\FormSubmitted
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
None
Additional details
No response