Since I’ve updated to 1.1.16, the file validation (only on update) not pass the rule. When I return to 1.1.15, it works. Anyone more?
Since I’ve updated to 1.1.16, the file validation (only on update) not pass the rule. When I return to 1.1.15, it works. Anyone more?
Which is the solution finally? In the issues have no solution.
There are 2 solutions for this problem as follows:
array('file_name', 'required', 'on'=>array('update')),
$fileInstance = CUploadedFile::getInstance($model, 'file_name');
if (!empty($fileInstance)) {
//then save your file
}
Hope this helps you.
Thanks!