title: How to subscribe to predispatch of registration in Shopware 6 just like shopware 5?
body: <p>I want to call a function right before the registration process starts in order to check some values from the registration form. In Shopware 5 I would use a predispatch event for that. How to do that in Shopware 6?</p>
  <p>This is the method into which the form posts the registration data to:</p>
  <pre><code>/**
   * @Route(&quot;/account/register&quot;, name=&quot;frontend.account.register.save&quot;, methods={&quot;POST&quot;})
   * @Captcha
   */
  public function register(Request $request, RequestDataBag $data, SalesChannelContext $context): Response
  {
  </code></pre>