Answer the question
In order to leave comments, you need to log in
How to see a validation error when saving a model?
Yii 1.1.15 I am
saving the model. $model->save()
The model is not saved. Most likely, not all parameters satisfy the conditions in rules. How to see the error in order to find out the reason for the failure to save?
Answer the question
In order to leave comments, you need to log in
According to Yii wagon and a small cart of documentation, have you tried looking in it first?
This is if you really have an error in the validation process. But just in case, check for beforeSave() hooks in the model. If you do not return true from there, then the model will not be quietly saved, there will be no validation errors.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question