Returning error message from form validation

Is there a mechanism for returning a error message after (custom) validation of a form?


just returns the user to the form.

Have a look at the Form plugin’s onFormProcessed method in the form.php file, where you’ll find some lines of code similar to:

new Event([
     'form'    => $form,
     'message' => 'some message'


That should work for you.

It sure did, thank you!