title: CakePHP custom Validation rule checks unique field combination only on create
body: <p>I have a Database with a User model. These Users should be unique by their name and birthday. 
  So I wrote a custom validation function called checkUnique</p>
  
  <pre><code>public function checkUnique($check){
          $condition = array(
              "User.name" =&gt; $this-&gt;data["User"]["name"],
              "User.lastname" =&gt; $this-&gt;data["User"]["lastname"],
              "User.birthday" =&gt; $this-&gt;data["User"]["birthday"]
          );
  
          $result = $this-&gt;find("count", array("conditions" =&gt; $condition));
  
          return ($result == 0);
  }
  </code></pre>
  
  <p>The validation rule in the model:</p>
  
  <pre><code>"name" =&gt; array(
         "checkUnique" =&gt; array(
              "rule" =&gt; array("checkUnique"),
              "message" =&gt; "This User already exists.",
              "on" =&gt; "create"
         ),
  )
  </code></pre>
  
  <p>I have two problems.
  The first: This validation rule also triggers on update action, implemented as</p>
  
  <pre><code>public function edit($id = null) {
          if (!$this-&gt;User-&gt;exists($id)) {
              throw new NotFoundException(__('Invalid User'));
          }
          if ($this-&gt;request-&gt;is(array('post', 'put'))) {
              if ($this-&gt;User-&gt;save($this-&gt;request-&gt;data)) {
                  $this-&gt;Session-&gt;setFlash(__('Update done.'));
                  return $this-&gt;redirect(array('action' =&gt; 'index'));
              } else {
                  $this-&gt;Session-&gt;setFlash(__('The user can't be saved.'));
              }
          } else {
              $options = array('conditions' =&gt; array('User.' . $this-&gt;User-&gt;primaryKey =&gt; $id));
              $this-&gt;request-&gt;data = $this-&gt;User-&gt;find('first', $options);
          }
      }
  </code></pre>
  
  <p>But I wrote <code>"on" =&gt; "create"</code>, so why it triggers also on update?
  The second problem:
  If the validation rule only triggers on create, how can I manage, to trigger an validation error, if someone change the name, lastname and birthday like an other user in the Database? Then the unique validation rule should be triggered.</p>