problems with validations

Hello All,

I have one form with database interactive and i m extending class CActiveRecord… and also added rules array in class file… but validations are not working with CActiveRecord… i have seen examples for CFormModel class and validations working in that… so can anyone tell me how i do validations for CActiveRecord…

Thanks in Advance…

Regards,

Ashish

Did you generate the model using gii? In order to work correctly, the usual coding rules apply like inheriting from CActiveRecord (which is sounds like you did) and making sure that all your functions are correct in their definition like public function rules().

If you cannot generate this model using gii, create another one and use it to compare to yours.