[EXTENSION] EAjaxValidationMessages

EAjaxValidationMessages was created in order to make more general the solution of the problem described here:


The extension can be downloaded here:


great extension! i had a feature request.

Would be great if you could make it more customizable. Like, ability to just show error summary or apply css from some other file.

Hi Mukesh, yes, I plan to introduce more features as my project requires them, very soon, the first one would be great (show summary). But I didn’t understand this one (apply css from some other file). Could you explain this in more detail?


P.S. Anyway I must insist: yiiactiveform should provide these things directly. Maybe the maintainers could take this extension into account to add the functionality (certainly improved and more consistent, as they can modify the core).

please forget my css remarks.

I have one other question - How is the widget supposed to behave if the same form repeats itself multiple times in the same page. The element id construction (jQuery(’#’+key+‘em’) seems to assume the presence of a single form in a page. Is there anyway to change the code (i am a jquery newbie) so that it takes into consideration the id of the form it was called for and show errors with that form only (id some-form in this case - jQuery(’#some-form’).ajaxvalidationmessages(‘show’, html);).

Sounds very useful… defiantly will check it out soon…

Version 1.1 (20110916) - Summary is shown if it exits. You need to specify the CSS class name for the summary, since it’s used as the selector to display it.

I haven’t used the same model more than once in the same page, so I don’t know how Yii solves the problem of having duplicated IDs for the elements. Do you have a sample of your HTML which you could post?

Yii generates duplicate ids for the form elements. So, i generate the ids myself. I think i will have to customize your code to suit my needs.

Please explain me what are extensions?How do we use it?where to use it?why to use it?diff between behaviours.components,widgets and are they the childern of extensions or subparts…Please explain as i am new to yii and also i am not really able to understand the conventions of variables in yii.Because in cakephp there are certain rules which are not present in this framework???????????//Please help me out as I am very keen to understand the basic things rather than going directly to the higher step

Thanks you so much!!!

i have a little problem. all works, but if i have an error (for example field required) and the fill the field, the error doesn’t hide

i use the id of my form

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

            'id' => 'users',

than in success


i have try also with the id of my div id

if i write an alert inside else, i see alert.


if i use

"dataType" => "json",

not works?


I have the same problem, did you fix it?

I also have same problem but with a little difference: I have several fields, when filling the last field altered the error remain on it and don’t hide. Can you resolve it?

And other thing, how to show errorSummary? Can take an example?

If using from extension not very important for you, here is my practice that have no these problems. with little manipulation you can write a beautiful extension.