validating generated textfield in a model


please help me with this:

i have data in database that will be display in the view using foreach. oneof the data will be represented by a textfield…this textfield has a name of duration[]-(this is an array)… all i want to know is how this textfield validated in a model.

note: i used chtml::textfield

Have you set validation rules in your model?

yes but the duration[] is an array. in my model duration is only one. maybe i think the duration[] can’t recognize by the model