title: ZF2 - stop executing after forward
body: <p>If there are any errors after validations, I forward back to input controller, and if there is no error, continue success controller.</p>
  
  <p>In ZF1, I was able to do this because fowarding in preDispatch() doesn't execute called action like following:</p>
  
  <pre><code>public function preDispatch()
  {
      parent::preDispatch();
      if ($action == 'success' &amp;&amp; $this-&gt;validate() === false) {
          $this-&gt;_forward('input');
      }
  }
  
  public function successAction()
  {
  }
  
  public function inputAction()
  {
  }
  </code></pre>
  
  <p>In ZF2, I am trying to attach validations on dispatch and forwarding if any errors, but ZF2 continues to execute, so inputAction and successAction are both called.</p>
  
  <pre><code>$events-&gt;attach('dispatch', function (MvcEvent $e) use ($controller) {
      $result = $this-&gt;validate($controller);
      if ($result-&gt;isValid() === false) {
          $callingClassName = get_class($this);
          $test = $controller-&gt;forward()-&gt;dispatch($callingClassName, array('action' =&gt; 'input'));
      }
  }
  </code></pre>
  
  <p>Any solutions for this?
  I just want to stop executing after forward...</p>
  
  <p>I know returning ViewModel in successAction stops anymore reads, but I want to make it commonly usable.</p>