Custom form handling fault?

Hi, I’m new to grav and i created a simple plugin for additional form validation.
This works fine so far, but when a validation error occurs and $event->stopPropagation() is called
only the next form action in the series will be stopped instead of all.

This means in my example below, the Email won’t be sent but the page will be redirected.

Is this the right behavior or is something wrong within the plugin?

Form frontmatter:

process:
        -   validate: validate
        -   email:
                from: "{{ form.value.email }}"
                to: "{{ config.plugins.email.to }}"
                subject: "Contact"
                body: "{% include 'forms/mail.html.twig' %}"
        -   redirect: contact/thankyou

Plugin code:

<?php 
namespace Grav\Plugin;

use Grav\Common\Plugin;
use RocketTheme\Toolbox\Event\Event;

class ValidationPlugin extends Plugin{
    public static function getSubscribedEvents()    {
        return [
            'onFormProcessed' => ['onFormProcessed', 0]
        ];
    }

    public function onFormProcessed(Event $event){
        $form = $event['form'];
        $action = $event['action'];
        $params = $event['params'];
        switch ($action) {
            case 'validate':
                $arrPost = $form->value()->toArray();
                $errCount = 0;
                if ($arrPost['json'] != "an" || !empty($arrPost['website']) || !empty($arrPost['mail']) || $arrPost['form-id']!=$form->name){
                    $errCount++;
                    $errMsg[] = $this->grav['language']->translate('FORM.VALIDATION_FAIL', null, true) .  $this->grav['language']->translate('PLUGIN_VALIDATION.ERROR_BOT');
                }
                if (isset($arrPost['schash'])  && $arrPost['schash'] != md5($arrPost[$arrPost['scfield']])){
                    $errCount++;
                    $errMsg[] = $this->grav['language']->translate('FORM.VALIDATION_FAIL', null, true) .  $this->grav['language']->translate('PLUGIN_VALIDATION.ERROR_SC');
                }
                if($errCount > 0){
                    $this->grav->fireEvent('onFormValidationError', new Event(['form' => $form, 'message' => implode('<br>',$errMsg)]));
                    $event->stopPropagation();
                    return;
                }
                break;
        }
    }
}
---

You might have stumbled on a problem. Can you test this PR https://github.com/getgrav/grav-plugin-form/pull/40 ?

Yeah, this PR solves the Problem. Thanks!