CActiveForm & hideErrorMessage


I wonder what is the interest of this hideErrorMessage clientOption in CActiveForm.

If we don’t want the error messages, we just need to not echo the $model->error() in the view method, right ?

Maybe is it to change the value of this option on the fly …



the call to error() set that attribute for ajax validation too… so in the case that you want the ajax validation but don’t want the error message to display… there is that option.

Thanks. But I meant that calling error() without the "echo" statement would produce the same result no ?


It all depends on your needs… for example if in the case of an error you want the INPUT field to be marked with a red background but no error message… than you need to echo it…

Ok thanks ! :D