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