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
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)…
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.