A question about symfony form validators. For example I have an url field. If the user leave this field empty, it is OK. But if the user provide an url, he should provide a valid one.
I tried $this->setValidator('url', new sfValidatorUrl(array(), array('invalid' => 'invalid url')));
. But it doesn't permit empty values. (which is not the desired behavior)
In another word. I need a Null-Or-Valid validator. I prefer not to write a new validator myself. I think I should be able to combine some validators to achieve my goal.