Place the validator at the choice1 element. You can write a custom validator that accepts a $context array as the second parameter to filter() which will contain the rest of the forms values. You can then test the checkboxes at that point.
-- Hector On Tue, Dec 22, 2009 at 5:54 AM, Guillaume ORIOL <[email protected]> wrote: > Here is a schematic view of the form I have: > (*) choice 1 > [X] option 1 > [_] option 2 > [_] option 3 > ( ) choice 2 > > When "choice 1" is checked, at least one of the three options should be > checked. > I wanted to write a specific validator for the options but... > as the "options" multi-checkbox is not required (as they are ignored if > choice 2 is checked), when no option is checked, the validator is not > executed at all. > > Does anybody have a solution for it? > > Thanks > -- > > Guillaume ORIOL > >
