Yii Framework Forum: AJAX Validation problem in Yii 1.1.9 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

AJAX Validation problem in Yii 1.1.9 It works in 1.1.8. I have problem after upgrading to Yii 1.1.9. Rate Topic: -----

#1 User is offline   IB Afriana 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 03-January 11

Posted 06 January 2012 - 05:33 PM

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?
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,420
  • Joined: 12-October 09
  • Location:Croatia

Posted 07 January 2012 - 04:53 AM

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.
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   bobbydigital 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 21
  • Joined: 11-December 10

Posted 07 January 2012 - 06:56 AM

@mdomba

Quote

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.


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.
0

#4 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,420
  • Joined: 12-October 09
  • Location:Croatia

Posted 07 January 2012 - 08:13 AM

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...
Find more about me.... btw. Do you know your WAN IP?
0

#5 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,420
  • Joined: 12-October 09
  • Location:Croatia

Posted 07 January 2012 - 08:48 AM

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
Find more about me.... btw. Do you know your WAN IP?
0

#6 User is offline   bobbydigital 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 21
  • Joined: 11-December 10

Posted 07 January 2012 - 09:59 AM

Now is working great. Thank you for fast fix.
0

#7 User is offline   IB Afriana 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 03-January 11

Posted 08 January 2012 - 06:01 AM

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users