Previously, I was not using $model->save() function for inserting or updating any data. I was simply using createCommand() to execute query and
$model->save()
createCommand()
Try this:
$model->save(false);
and if thats working, check your model rules() and your form rules() if its having the same rules. usually the cause is the required fields in your table.