mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Validate类的image验证规则
This commit is contained in:
@@ -547,7 +547,7 @@ class Validate
|
||||
$result = $value instanceof \think\File;
|
||||
break;
|
||||
case 'image':
|
||||
$result = $value instanceof \think\File && exif_imagetype($value->getRealPath());
|
||||
$result = $value instanceof \think\File && in_array(exif_imagetype($value->getRealPath()), [1, 2, 3, 6]);
|
||||
break;
|
||||
default:
|
||||
if (isset(self::$type[$rule])) {
|
||||
|
||||
Reference in New Issue
Block a user