Hy,
How i try to do to validate that in a symfony form one of two fields is filled? In their database definition are'nt required fields but i need that one of two fields will be filled by the user.
Thanks
Like this???
$this->setValidator('phone', new sfValidatorAnd(
array(
new sfValidatorSchemaCompare('email', '==', ''),
new sfValidatorSchemaCompare('phone', '==', ''),
),
array(),
array('invalid' => 'El e-mail no tiene un formato correcto',
'required' => 'Campo obligatorio'
)
));
it doesn't work... :(