first commit
This commit is contained in:
19
滴滴淘/diditao/app/validate/api/ImageValidate.php
Normal file
19
滴滴淘/diditao/app/validate/api/ImageValidate.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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'
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user