1. Go to this page and download the library: Download makbari/media-validator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
makbari / media-validator example snippets
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(),
];
}
public function rules()
{
return [
'video_input' => new \makbari\rules\validator\Video(['mp4', 'mkv'])
];
}