How we can track the exact validation error ?

Hi,

Can any one tell me, how I can track the exact validation error in yii.

$profile->validate(); is not working in my application , database and rules are looking right.

I am unable to track the exact validation error.

Thanks,

Abhay

What do you mean CActiveRecord::validate() isn’t working?

Do you mean it is returning true but then the database operation fails, if this is the case it means your rules are letting invalid data through.

Or do you mean it is returning false and there is an error, if this is the case you can inspect the CAtiveRecord::errors array to see any errors.