makbari/media-validator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

makbari/media-validator

最新稳定版本:0.2.0

Composer 安装命令:

composer require makbari/media-validator

包简介

Audio and Video validator

README 文档

README

Validator for Audio and Video files in laravel framework based projects

Installation with Composer

curl -s http://getcomposer.org/installer | php
php composer.phar require makbari/media-validator

Usage

In laravel based projects form validation could be checked by several methods; but all of them have the same structure and syntax

public function rules()
{
    return [
        'video_input' => new \makbari\rules\validator\Video(),
        'audio_file' => new \makbari\rules\validator\Audio(),
        'image_file' => new \makbari\rules\validator\Image(),
        'document_file' => new \makbari\rules\validator\Document(),
    ];
}

Also you can pass your valid types to the validators:

public function rules()
{
    return [
        'video_input' => new \makbari\rules\validator\Video(['mp4', 'mkv'])
    ];
}

Available formats

video - mp4, 3gp, flv, mkv, avi, asf, asx, wmv, mpeg
audio - mp3, wav, ogg, amr, wma, oga, m4a, m4b, ra, ram, mid, midi, aac
document - csv, doc, docx, pdf, ppt, xls, xlsx, txt, css, html, htm
image - jpg, jpeg, gif, png, bmp, tif, tiff, ico

统计信息

  • 总下载量: 6.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-17