CActiveForm with custom class upon validation

Using CActiveForm, it seems that the error class gets applied to the DIV surrounding our form element groups.

But, that extra useless div it’s really annoying, imho.

Isn’t there another way to add a class on a element upon validation, without forcing us to stick to this html structure ?