title: Logical validation Symfony form
body: <p>Using Symfony1, how could I validate one of two fields is being filled in in a form? They are but not required fields but I need the user to fill in one of the two field. This is my attempt so far, but it doesn't work:</p>
  
  <pre><code>$this-&gt;setValidator('phone', new sfValidatorAnd(
    array(
      new sfValidatorSchemaCompare('email', '==', ''),
      new sfValidatorSchemaCompare('phone', '==', ''),
    ),
    array(),
    array(
      'invalid' =&gt; 'El e-mail no tiene un formato correcto',
      'required' =&gt; 'Campo obligatorio',
    )
  ));
  </code></pre>