Hi to all!
I’m pretty new in Yii, and i can’t find the way to add the “error” label to an HTML element class after a validation error, to obtain the same behavior of the CRUD generated form when you don’t insert a required attribute in the form.
I made the form by myself for project reasons. Then, my situation is that i have a set of dropdownlist, each of them represents an object to be saved in the db.
When i validate them in the controller, i’m able to catch and display a possible error message by the addError() method on the instance of the current object, but i don’t know how set the class of the corresponding “dropdown” item, adding “error” to the class attribute of the dropdown.