Yii Framework Forum: Cactiveform Ajax Validation For All Fields - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cactiveform Ajax Validation For All Fields Rate Topic: -----

#1 User is offline   pauherj 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 20-October 10

Posted 11 January 2013 - 12:34 PM

In a CActiveForm with ajaxValidation=true, I need to show the messages for all fields each time the user modifies a field.
This is because I have cross validations.
To do this i have to edit jquery.yiiactiveform.js to comment the lines 99 & 101 (Yii 1.1.13)
//if (this.status === 2 || this.status === 3) { (original)
  hasError = $.fn.yiiactiveform.updateInput(this, data, $form) || hasError;
//}

Is this correct or there is any other way?
Thanks.
0

#2 User is offline   robregonm 

  • Experienced Yii Developer
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 601
  • Joined: 30-July 09
  • Location:Colombia

Posted 11 January 2013 - 03:11 PM

In that case, your solution is the way :)
Ricardo Obregón
LinkedIn Profile
YiiFramework en Español - http://yiiframework.co/ - Yii Code Generator for Bootstrap
http://obregon.co/ - https://1server.co/
PHP 5.5+, nginx, MySQL, PostgreSQL, Yii 1.x & 2.x, CanJS and more.
Follow me: @robregonm & @obregonco & @1ServerCo.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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