Yii Framework Forum: Disable Input Errors: Dummy On Ajax Validation - Yii Framework Forum

Jump to content

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

Disable Input Errors: Dummy On Ajax Validation Rate Topic: -----

#1 User is offline   gunnit 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 08-June 12

Posted 09 October 2012 - 05:39 AM

Hello all , thanks for reading , i am wandering how to disable the following message :
Please fix the following input errors: dummy,
I enabled ajax validation and now i keep on getting that message. can someone explain to me what it is reffering to and how to disable it on ajax validation?
0

#2 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 1,527
  • Joined: 16-February 11
  • Location:Japan

Posted 09 October 2012 - 06:16 AM

Hi gunnit,

What is "dummy"?
I mean, you have to elaborate your code a little more, otherwise we have no means to understand your issue.
0

#3 User is offline   zaccaria 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 2,159
  • Joined: 04-October 09
  • Location:Moscow

Posted 09 October 2012 - 06:18 AM

This is generated by CHtml::errorSummary, remove it and you are done.
0

#4 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 1,527
  • Joined: 16-February 11
  • Location:Japan

Posted 09 October 2012 - 06:21 AM

View Postzaccaria, on 09 October 2012 - 06:18 AM, said:

This is generated by CHtml::errorSummary, remove it and you are done.

Oh, is it? I didn't know that. :(
0

#5 User is offline   gunnit 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 08-June 12

Posted 09 October 2012 - 07:40 AM

View Postsoftark, on 09 October 2012 - 06:16 AM, said:

Hi gunnit,

What is "dummy"?
I mean, you have to elaborate your code a little more, otherwise we have no means to understand your issue.


I get "dummy" as a default value when i want to create a new reccord, but this only happens when i enable ajax validation. If i take off error summary i do not see the actual validation error messages . If iam not clear i can elaborate further
0

#6 User is offline   bennouna 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,119
  • Joined: 05-January 12
  • Location:Morocco

Posted 09 October 2012 - 08:06 AM

I think you have to post the relevant parts of your view and model as well.

It should come from CActiveForm's errorSummary() code:

  public function errorSummary($models,$header=null,$footer=null,$htmlOptions=array())
  {
    if(!$this->enableAjaxValidation && !$this->enableClientValidation)
      return CHtml::errorSummary($models,$header,$footer,$htmlOptions);

    if(!isset($htmlOptions['id']))
      $htmlOptions['id']=$this->id.'_es_';
    $html=CHtml::errorSummary($models,$header,$footer,$htmlOptions);
    if($html==='')
    {
      if($header===null)
        $header='<p>'.Yii::t('yii','Please fix the following input errors:').'</p>';
      if(!isset($htmlOptions['class']))
        $htmlOptions['class']=CHtml::$errorSummaryCss;
      $htmlOptions['style']=isset($htmlOptions['style']) ? rtrim($htmlOptions['style'],';').';display:none' : 'display:none';
      /* line 529 in v1.1.12 */
      $html=CHtml::tag('div',$htmlOptions,$header."\n<ul><li>dummy</li></ul>".$footer);
    }

    $this->summaryID=$htmlOptions['id'];
    return $html;
  }

1

#7 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 1,527
  • Joined: 16-February 11
  • Location:Japan

Posted 09 October 2012 - 08:21 AM

Thanks, bennouna. I didn't know that.

But the display of that 'dummy' should be kept hidden by 'display:none' ...
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