Should I add assert validation on boolean doctrine field?
doctrine-orm, symfony
Solution
No, you have only two cases. Value is present or not - so true or false. I imagine a validator only in one case if this checkbox has to be set by user always like "accept disclaimer" during registration process
Problem
I have a Doctrine entity that has boolean field. Should I add Symfony validation for it (for type boolean), or my form is correctly validated by inferring the type automatically? ``` class Entity { /** * @ORM\Column(type="boolean") * @Assert\.... <- do I have to apply any Symfony assertion here? */ private $isActive; } ```