Within Symfony2 how to validate an inputfield is not-blank, only when the value of a checkbox is 1 (True) - otherwise blank is allowed?
To be more precise, I have a
could you do something like this ?
/** * @Assert\True() */ public function customValidate() { return (!$this->checkboxField) or (strlen($this->inputField) > 0); }