title: CakePHP Form Validation only on Entering Data
body: <p>I am trying to Upload a photo for one of the models and when i am going to the edit mode. It still asks me to upload the photo when the user only wants to edit the text related to that record. Below is my Validation Rules. </p>
  
  <pre><code>    'display_photo' =&gt; array(
          'uploadError' =&gt; array(
              'rule' =&gt; array('uploadError'),
              'message' =&gt; 'Please select a Photo.',
              'allowEmpty' =&gt; true,
          ),
          'mimeType' =&gt; array(
              'rule' =&gt; array('mimeType', array('image/gif', 'image/png', 'image/jpg', 'image/jpeg')),
              'message' =&gt; 'Please only upload images (gif, png, jpg).',
              'allowEmpty' =&gt; true,
          ),
          'fileSize' =&gt; array(
              'rule' =&gt; array('fileSize', '&lt;=', '5MB'),
              'message' =&gt; 'Photo must be less than 5MB.',
              'allowEmpty' =&gt; true,
          ),
          'photoUpload' =&gt; array(
              'rule' =&gt; array('photoUpload'),
              'message' =&gt; 'Unable to process Photo upload.',
              'allowEmpty' =&gt; true,
          ),
      ),
  </code></pre>
  
  <p>Upload Function</p>
  
  <pre><code>   public function photoUpload($check = array()) {
          if (!is_uploaded_file($check['display_photo']['tmp_name'])) {
              return false;
          }
  
          if (!move_uploaded_file($check['display_photo']['tmp_name'], WWW_ROOT . 'img' . DS .
              'portfolios' . DS . $this-&gt;data[$this-&gt;alias]['slug'].".".pathinfo($check['display_photo']['name'], PATHINFO_EXTENSION))) {
              return false;
          }
          $this-&gt;data[$this-&gt;alias]['display_photo'] = $this-&gt;data[$this-&gt;alias]['slug'].".".pathinfo($check['display_photo']['name'], PATHINFO_EXTENSION);
          return true;
      }
  </code></pre>