Validate DropDownList

Hello Yii Developers,

I have a DropDownList and I have a button that shows a div container when you click on it.

I want to show the error message of the DropDownList if the user click the button before selecting the data in the DropDownList.

Right now, the error message is showed when the the user select a wrong data from the DropDownList, but I don’t know how to show the message if the user click the button directly.

Hope you can help me :)

use "required" in your model rules