title: cakephp file field validation
body: <p>i m trying to validate file field in cakephp in model with valid extension on create and on update try to validate file only if field is not empty.On Create the validation works fine, But on update it validates the if field is empty.I want to validate extensions only when the field is not empty
  here is my validation rule in model validation array </p>
  
  <pre><code>'image' =&gt; array(
          'rule1'=&gt;array(
              'rule' =&gt; array('extension',array('jpeg','jpg','png','gif')),
              'required' =&gt; 'create',
              'allowEmpty' =&gt; true,
              'message' =&gt; 'Select Valid Image',
              'on' =&gt; 'create',
              'last'=&gt;true
          ),
          'rule2'=&gt;array(
              'rule' =&gt; array('extension',array('jpeg','jpg','png','gif')),
              //'required' =&gt; 'create',
              'allowEmpty' =&gt; true,
              'message' =&gt; 'Select Valid Image',
              'on' =&gt; 'update',
          ),
      ),
  </code></pre>