Files
CompanyProject/滴滴淘/diditao/app/validate/api/ImageValidate.php
2024-09-27 01:32:49 +08:00

19 lines
470 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\validate\api;
use diditao\common\base\BaseValidate;
class ImageValidate extends BaseValidate
{
protected $exceptionKey = 'upload validate failed';
protected $rule=[
'file'=>'filesize:10485760|fileExt:jpg,png,gif,jpeg'
];
protected $message=[
'file.filesize'=>'文件大小超过系统最大限制10M',
'file.fileExt'=>'系统不支持此格式文件支持的文件格式jpg,png,gif,jpeg'
];
}