Server side validation - 'inputContainer' in CActiveForm not work

I’m using bootstrap css with Yii. If error exists in input field, the “error” class should be added to the div.control-group, not the input field that Yii does by default.

If client side validation or ajax validation is enabled, I could set


'ClientOptions'=>array('inputContainer' => 'div.control-group')

.

However it does not work on server side validation - the "error" class will still be added to the input field itself.

Anyone could help?

Note that there is a subtle difference on how the "error" class is applied with ajax validation and server validation… while ajax validation sets the error class on the row container the server validation does set only the input field (not the row container)…

For the server validation you can set the CHtml::errorCss property - http://www.yiiframework.com/doc/api/1.1/CHtml#errorCss-detail

Isn’t the option called “clientOptions” ? It’s case sensitive

I am having exactly the same problem. Is there anyone can help? Just don’t know how to set “error” class to “div.control-group” on server side validation.

Any solution? Same issue here.