Here I have a model which has an image(mandatory attribute) $model->image_file.
When we update the model with the image it turns out that image_file is empty and there is a validation error.
How to make file when the update was filled again that there was no such?
image_file You should not contain the file and line the file name. And for file add 1 more attribute, such as file. public $file;
Then there will be no mistakes and validation will normally work on the file individually and its title separately