PHPackages                             di/clamav-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. di/clamav-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

di/clamav-validator
===================

Custom Laravel 5 anti-virus validator for file uploads.

1.3.2(7y ago)02.3k2MITPHPPHP &gt;=5.5.0

Since Oct 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/digitalideastudio/clamav-validator)[ Packagist](https://packagist.org/packages/di/clamav-validator)[ Docs](https://github.com/digitalidea/clamav-validator)[ RSS](/packages/di-clamav-validator/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (6)Versions (16)Used By (0)

ClamAV Validator For Laravel 5
==============================

[](#clamav-validator-for-laravel-5)

[![SensioLabsInsight](https://camo.githubusercontent.com/ec6e5584ba95f53a0f2d907aaf3921f633ea050803d03f0576e76be87950a159/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f38306632383832352d313338352d346461612d616161642d3065346336623662333931302f6d696e692e706e67)](https://insight.sensiolabs.com/projects/80f28825-1385-4daa-aaad-0e4c6b6b3910)[![Code Coverage](https://camo.githubusercontent.com/5f9d001fce03c2d8af0a9c802b1d5e41ba35d4d07eba425f30e8b882ab6bf519/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6469676974616c696465612f636c616d61762d76616c696461746f722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/digitalidea/clamav-validator/?branch=master)[![Code Quality](https://camo.githubusercontent.com/538bb5a068daa155f7f114840bffe923a97a3242bc3ed742a893f02e094dbac4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6469676974616c696465612f636c616d61762d76616c696461746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/digitalidea/clamav-validator)[![Build Status](https://camo.githubusercontent.com/daf3e4569f81718e0eed5c5053c06689ebdef9eb22c057040b1eac38c4ac2971/68747470733a2f2f7472617669732d63692e6f72672f6469676974616c696465612f636c616d61762d76616c696461746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/digitalidea/clamav-validator)[![Latest Stable Version](https://camo.githubusercontent.com/fdbe2423ebe3d5d24f7d4a4aae3a2d76d9e1662b77c617018895e9e307e7ef26/68747470733a2f2f706f7365722e707567782e6f72672f6469676974616c696465612f636c616d61762d76616c696461746f722f762f737461626c65)](https://packagist.org/packages/digitalidea/clamav-validator)[![License](https://camo.githubusercontent.com/6a1cb2d2d65b2752bc881ac365bd3ef0558233ec324d16c3c9bbf17e39d83e38/68747470733a2f2f706f7365722e707567782e6f72672f6469676974616c696465616469676974616c696465612f636c616d61762d76616c696461746f722f6c6963656e7365)](https://packagist.org/packages/digitalidea/clamav-validator)

Custom Laravel 5 anti-virus validator for file uploads.

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Configuration](#configuration)
- [Author](#author)

Requirements
------------

[](#requirements)

You must have ClamAV anti-virus scanner running on the server to make this package work.

You can see the ClamAV installation instructions on the official [ClamAV documentation](http://www.clamav.net/documents/installing-clamav).

For example on an Ubuntu machine, you can do:

```
# Install clamav virus scanner
sudo apt-get update
sudo apt-get install clamav-daemon

# Update virus definitions
sudo freshclam

# Start the scanner service
sudo service clamav-daemon start
```

This package is not tested on windows, but if you have ClamAV running (usually on port 3310) it should work.

Installation
------------

[](#installation)

#### 1. Install the package through [Composer](http://getcomposer.org).

[](#1-install-the-package-through-composer)

```
$ composer require di/clamav-validator
```

#### 2. Add the service provider (for Laravel 5.4 or below)

[](#2-add-the-service-provider-for-laravel-54-or-below)

This package supports Laravel new [Package Discovery](https://laravel.com/docs/5.5/packages#package-discovery).

If you are using Laravel &lt; 5.5, you need to add `DI\ClamavValidator\ClamavValidatorServiceProvider::class` to your `providers` array in `config/app.php`:

```
'providers' => array(
	// ...

	DI\ClamavValidator\ClamavValidatorServiceProvider::class,
),
```

Usage
-----

[](#usage)

Use it like any `Validator` rule:

```
$rules = array(
	'my_file_field' => 'clamav',
);
```

Configuration
-------------

[](#configuration)

By default the package will try to connect the clamav daemon via the default socket file (/var/run/clamav/clamd.ctl) and if it fails it will try the tcp port (127.0.0.1:3310)

But you can set the `CLAMAV_UNIX_SOCKET` (socket file path) or `CLAMAV_TCP_SOCKET` (host:port) environment variables to override this.

Credits
-------

[](#credits)

Krishnaprasad MG \[@sunspikes\]

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~90 days

Recently: every ~154 days

Total

15

Last Release

2598d ago

PHP version history (2 changes)v1.0PHP &gt;=5.4.0

1.3.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c430ad6ef9959bb139b60acb41c1f3e8571934c801c9647be5f243bed41b99a6?d=identicon)[matrunchyk](/maintainers/matrunchyk)

---

Top Contributors

[![sunspikes](https://avatars.githubusercontent.com/u/75611?v=4)](https://github.com/sunspikes "sunspikes (33 commits)")[![matrunchyk](https://avatars.githubusercontent.com/u/2089828?v=4)](https://github.com/matrunchyk "matrunchyk (8 commits)")[![b141568](https://avatars.githubusercontent.com/u/10284219?v=4)](https://github.com/b141568 "b141568 (1 commits)")[![piotrpawlas](https://avatars.githubusercontent.com/u/112560380?v=4)](https://github.com/piotrpawlas "piotrpawlas (1 commits)")[![sbine](https://avatars.githubusercontent.com/u/1902973?v=4)](https://github.com/sbine "sbine (1 commits)")

---

Tags

laravelvalidatorvirusclamav

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/di-clamav-validator/health.svg)

```
[![Health](https://phpackages.com/badges/di-clamav-validator/health.svg)](https://phpackages.com/packages/di-clamav-validator)
```

###  Alternatives

[sunspikes/clamav-validator

Custom Laravel 5 anti-virus validator for file uploads.

3651.8M3](/packages/sunspikes-clamav-validator)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
