Given the following markup:
<div class="row terms">
<?php echo $form->labelEx($model, 'agree_terms', array('for'=>false)); ?>
<div class="option">
<?php echo $form->checkbox($model, 'agree_terms'); ?>
<?php echo CHtml::label('I have read and accept the Terms of Use', 'User_agree_terms', array('class'=>'agree-terms')); ?>
</div>
<?php echo $form->error($model, 'agree_terms'); ?>
</div>
The problem is, in AJAX validation mode, the model label does not get highlighted (the ‘error’ class gets applied to the inner div). However in PHP validation mode it does get highlighted.