更新目录结构
This commit is contained in:
@@ -13,13 +13,14 @@ use think\Validate;
|
||||
class File extends Validate{
|
||||
|
||||
protected $rule = [
|
||||
'avatar' => 'fileSize:102400|fileExt:jpg,png',
|
||||
'image' => 'fileSize:204800|fileExt:jpg,jpeg,png,webp',
|
||||
'file' => 'fileSize:1024 * 1000|fileExt:doc,xls,zip,rar'
|
||||
'avatar' => 'fileSize:1048576|fileExt:jpg,png',
|
||||
'image' => 'fileSize:1048576 * 2|fileExt:jpg,jpeg,png,webp',
|
||||
'file' => 'fileSize:1048576 * 5|fileExt:doc,xls,zip,rar'
|
||||
];
|
||||
protected $message = [
|
||||
'avatar.fileSize' => '图片不大于1M',
|
||||
'avatar.fileExt' => '头像后缀不正确',
|
||||
'avatar.image' => '头像尺寸不正确',
|
||||
'image.fileSize' => '图片大小超过允许上传大小'
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user