title: CakePHP 3 - How to automatically show validation errors in view for form without model
body: <p>I'm reviewing a basic contact form which is not associated with any model. I would like some advice on the best way to leverage Cake's automatic view rendering of field errors for this situation.</p>
  
  <p><strong>Controller</strong></p>
  
  <p>Performs validation through a custom Validator.</p>
  
  <pre><code>public function index()
  {
      if ($this-&gt;request-&gt;is('post')) {               
  
          // Validate the form
          $validator = new EnquiryValidator();
          $data = $this-&gt;request-&gt;data();
          $errors = $validator-&gt;errors($data);                    
  
          if (empty($errors)) {
  
              // Send email, etc.
              // ...
              // Refresh page on success
  
          }       
          // Show error
          $this-&gt;Flash-&gt;error('Unable to send email');
      }
  }
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <pre><code>&lt;?= $this-&gt;Form-&gt;create(); ?&gt;
  
      &lt;?= $this-&gt;Form-&gt;input('name', [
              'autofocus' =&gt; 'autofocus',
              'placeholder' =&gt; 'Your name',
              'required'
          ]);
      ?&gt;
  
      &lt;?= $this-&gt;Form-&gt;input('email', [
              'placeholder' =&gt; 'Your email address',
              'required'
          ]);
      ?&gt;
  
      &lt;?= $this-&gt;Form-&gt;input('subject', [
              'placeholder' =&gt; 'What would you like to discuss?',
              'required'
          ]);
      ?&gt;
  
      &lt;?= $this-&gt;Form-&gt;input('message', [
              'label' =&gt; 'Query',
              'placeholder' =&gt; 'How can we help?',
              'cols' =&gt; '30',
              'rows' =&gt; '10',
              'required'
          ]);
      ?&gt;
  
      &lt;div class="text-right"&gt;
          &lt;?= $this-&gt;Form-&gt;button('Send'); ?&gt;
      &lt;/div&gt;
  
  &lt;?= $this-&gt;Form-&gt;end(); ?&gt;
  </code></pre>
  
  <p>Currently the form will not show any errors next to the input fields. I assume it's because there is no entity associated with the form or something like that, but I'm not sure.</p>
  
  <p>What is the best solution? Can the validation be performed in a better way to automatically provide field errors in the view?</p>