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?