Yii Framework Forum: How To Get The Error From Error Summary - Yii Framework Forum

Jump to content

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

How To Get The Error From Error Summary Rate Topic: -----

#1 User is offline   mbala 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 156
  • Joined: 21-July 12
  • Location:Chennai, Tamilnadu, India

Posted 21 March 2013 - 05:25 AM

How to get the error based on field name from error summary
	<?php echo $form->errorSummary($model); 

It will display all errors. But I have to get errors for single field (like array). Is it possible?
0

#2 User is offline   Balu 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 153
  • Joined: 09-August 11
  • Location:Kerala, India

Posted 21 March 2013 - 05:29 AM

View Postmbala, on 21 March 2013 - 05:25 AM, said:

How to get the error based on field name from error summary
	<?php echo $form->errorSummary($model); 

It will display all errors. But I have to get errors for single field (like array). Is it possible?



<?php echo $form->error($model,'feild_name'); ?>
0

#3 User is offline   Lal Zada 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 125
  • Joined: 06-November 12
  • Location:Lahore, Pakistan

Posted 21 March 2013 - 05:33 AM

Check this link

http://www.yiiframew...rm#error-detail
Is it fast? Is it secure? Is it professional? Is it right for my next project? Yes, it is

Linkedin Facebook Twitter Google+
0

#4 User is offline   seenivasan 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 620
  • Joined: 17-June 12
  • Location:Chennai,TamilNadu,India.

Posted 21 March 2013 - 06:26 AM

Dear Brother

$model->getErrors("attributeName");


This will bring all the errors in array format for a particular attribute.
0

#5 User is offline   mbala 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 156
  • Joined: 21-July 12
  • Location:Chennai, Tamilnadu, India

Posted 21 March 2013 - 10:37 PM

Thank you friends
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