Actaully we use this creating a text filed.
$form->textField(CModel $model, string $attribute, array $htmlOptions=array ( ));
Form reference.
Generates a text field input for a model attribute. If the attribute has input error, the input field's CSS class will be appended with errorCss. The default css is 'error'.
How do we change it?
Add this into your views template for changing single view.
CHtml::$errorCss = 'warning';