AJAX Validation problem in Yii 1.1.9

Hi,

I have problem after upgrading Yii from 1.1.8 to 1.1.9. I simply replaced the framework directory with the new one from 1.1.9.

When I test action create/update in a form, click on a mandatory field, then without input anything, click on the next field. I expect the previous field should be marked as error. It works in Yii 1.1.8, but problem in 1.1.9.

I have also tried to create a new webapp using yiic command, but the live ajax validation does not work. Could anyone advise me how to use ajax validation in Yii 1.1.9?

Try to enter something, leave field, return to the same field delete the previously entered text and leave field… this time you should get the validation message.

If it’s not that… did you clean the assets folder? If not try that first.

If nothing helps… then please post here your view file, the rules and controller action so we can check what is going on.

@mdomba

This is really stupid behavior, can you please tell me why to make ajax validation, if i wait the user to enter something, then to delete it, and then to show him error on required non empty text field?

If field is required, and user clicks but don’t enter nothing and then leaves the field, the logical action is to show him message that this fields can’t be blank (like in 1.1.8), not to wait to click “submit” and then show him a message.

You have really made big mess with this jquery.yiiactiveform.js.

Yes, I made a nice mess this time, trying to solve the checkboxlist validation problem and optimizing the JS code… I optimised it a bit too much…

Hopefully with enough input like yours this time we will solve all the problems.

Already found the problem with this first time validation… will test a bit more and commit very soon the fix…

Here is the fix, let me know how it works for you - http://code.google.c…e/detail?r=3530

P.S. don’t forget to empty the assets folder

Now is working great. Thank you for fast fix.

The problem solved with the latest fix. Thank you very much!