hamaelt/zip-mime-type-validator
Composer 安装命令:
composer require hamaelt/zip-mime-type-validator
包简介
Laravel zip file mime type validator
README 文档
README
A validation rule for validating MIME type of zip files for Laravel to validate that the zip file only contains the allowed file types.
Installation
$ composer require hamaelt/zip-mime-type-validator
Requirement
- PHP 7.4 or higher
Usage
In your custom request class use ZipMimeType rule with passing the required file types as a string.
use Hamaelt\ZipValidator\Rules\ZipMimeType;; public function rules() { return [ 'zip_file' => [ 'required',new ZipMimeType('pdf,jpg,png')], ]; }
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2021-07-03