title: Get File Value in post validator using a form in symfony 1.4
body: <p>I have a form where you can upload a file if you select a choice, I'm trying to use a postValidator to throw an error if the user doesn't upload a file and there is not already a file uploaded </p>
  
  <p>In the Form Class I have the postValidator</p>
  
  <pre><code>$this-&gt;validatorSchema-&gt;setPostValidator(
    new sfValidatorCallback(array('callback' =&gt; array($this, 'checkFile'))));    
  
  public function checkFile($validator, $values){
    $file = $this-&gt;getOption('file');
    if($values['carta-compromiso'] &amp;&amp; !$values['file'] &amp;&amp; !$file){
      throw new sfValidatorError($validator, 'Debe subir el archivo de carta de compromiso.');
    }
    return $values;
  }
  </code></pre>
  
  <p>And in the action I pass the value $file with</p>
  
  <pre><code>$this-&gt;paso1_lleno = PostulacionTable::getInstance()-&gt;findOneByUsuarioId($this-&gt;getUser()-&gt;getGuardUser()-&gt;getId());
  $this-&gt;form = new Paso1Form(array(), array('file' =&gt; $this-&gt;paso1_lleno-&gt;archivo_carta_compromiso));
  </code></pre>
  
  <p>The value I get in the post validator with $values['file'] is always null, even if I choose a file.</p>