Yii Framework Forum: how to validate elements other than active elements - Yii Framework Forum

Jump to content

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

how to validate elements other than active elements Rate Topic: -----

#1 User is offline   vikram 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 24-June 09

Posted 25 July 2009 - 11:43 PM

how could i validate CHtml::dropdownlist();...........which is not a ActiveRecord
thanks to the hearts that wishes to clear my doubt or to help me
vikram
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,899
  • Joined: 04-October 08
  • Location:DC, USA

Posted 29 July 2009 - 08:14 AM

Validation is built around model (can be CFormModel, not necessarily CActiveRecord).
0

#3 User is offline   vikram 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 24-June 09

Posted 29 July 2009 - 11:45 AM

View Postqiang, on 29 July 2009 - 08:14 AM, said:

Validation is built around model (can be CFormModel, not necessarily CActiveRecord).

no i miss typed it
active elements are validated by writing code in CFormmodel.........is there any place there the validation for nonactive elemnts should be kept
thanks to the hearts that wishes to clear my doubt or to help me
vikram
0

#4 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,899
  • Joined: 04-October 08
  • Location:DC, USA

Posted 29 July 2009 - 04:35 PM

nope. You need a model if you want to use the validation provided by Yii.The input field is not necessarily generated by activeXyz.
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