Automate Validation

Is there a way to automate validation in Yii if the fields of a model are rows in a table instead of columns? The form is generated at runtime and there is a table just for the elements of the form.