title: Cake PHP, avoid and detect empty fields and duplicate primary key
body: <p>i'm not able to catch, inside Controller class, when a field is empty, or when user try to add a new row with duplicate primary key.
  this is my model validation array:</p>
  
  <pre><code>public $validate = array(
      'username' =&gt; array(
          'notEmpty' =&gt; array(
              'rule' =&gt; 'notEmpty',
              'message' =&gt; 'username empty',
              'required' =&gt; true
          ),
          'alphaNumeric' =&gt; array(
              'rule' =&gt; 'alphaNumeric',
              'message' =&gt; 'not alphanumeric'
          ),
          'maxLength' =&gt; array(
              'rule' =&gt; array('maxLength', 50),
              'message' =&gt; 'too long'
          ),
          'minLength' =&gt; array(
              'rule' =&gt;array('minLength', 1),
              'message' =&gt; 'too short'
          )
      ));
  </code></pre>
  
  <p>and this is my add action inside controller:</p>
  
  <pre><code>if ($this-&gt;request-&gt;is('post')) {
          $this-&gt;Admin-&gt;set($this-&gt;request-&gt;data);
          $this-&gt;Admin-&gt;create();
              // it validated logic
              if ($this-&gt;Admin-&gt;save($this-&gt;request-&gt;data)) {
                  $this-&gt;Session-&gt;setFlash(__('The admin has been saved.'));
                  return $this-&gt;redirect(array('action' =&gt; 'index'));
              } else {
                  $errors = $this-&gt;Admin-&gt;validationErrors;
                  debug($errors);
                  $this-&gt;Session-&gt;setFlash(__('The admin could not be saved. Please, try again.'));
              }
  }
  </code></pre>
  
  <p>but, </p>
  
  <ul>
  <li><p>if i leave empty my field, my custom message is not showed, but is showed default cakephp message for empty field</p></li>
  <li><p>if i try to add a duplicate element into my database (so i violate primary key), no error message is showed too, and i'm redirect automaticalli to index() action of controller (the default index action that shows database elements)</p></li>
  </ul>