This code:
$model = new SomeModel(); $model->attributes = $attributes; $model->save(); Yii::log("errors saving SomeModel: " . var_export($model->getErrors(), true)); |
Will log:
2014/07/31 22:57:59 [info] [application] errors saving SomeModel: array ( 'date' => array ( 0 => 'Date cannot be blank.', ), )