Validating checkbox is checked

Using CBooleanValidator how do you validate a checkbox has been checked? I have a rule set up as follows;




public $terms = false;


//..

array('terms','boolean','trueValue'=>true,'falseValue'=>false),

//..



However this is neither validating checked state is true but merely assigning the attribute true/false values…

Maybe it works with required validator, try it.

That solved it!

Cheers.

Glad it helped!