Problem with the data validation from an array

I have a problem with data validation. In my project, I have created a sequence of forms that retrieve the data from joined tables and write data to another table. I manage the data in a multi-dimension array. I need the database to provide the validation rules. If possible I want to use what the framework provides to do the form validations. I can put the validation rules in a table column of one of the joined tables and retrieve that into the array, but how can I hook this up to the validation mechanisms within Yii framework?

Did anyone know how to make it happen?

of course I could write a separate validation system in PHP for my project, but really I want where possible to take advantage of what the framework can offer. I just need to figure out how to call the relevant methods in the framework in relation to a joined table data set.