Client side and submit validation css error messages

Hi there,

I’ve found a problem with validation error messages that’s getting on my nerves. The form is created as follows:

<?php $form=$this->beginWidget('CActiveForm', array(






)); ?>

<div class="span-7 last">

	<?php echo $form->textField($model,'username');?>

	<?php echo $form->error($model,'username');?>



<?php $this->endWidget(); ?>

When "enableClientValidation" is set to "true", I get a nice and clean error message like in img_nice:3063

How can I make this two options look the same? in other words, how could I make submit validation error message look the same as client side validation error message?

Thanks a lot!


As by current design the client validation sets the "error" class on the row (i.e. container of the input field), but the server validation sets the "error" class on the input field.

So you just need to set your CSS rules accordingly

P.S. please do not use PM (private messages) for asking help

I have noticed this. The error class on the input field is not what I want.

How can I do that?

Sorry about bothering you with my PM.