PHPackages                             divineomega/laravel-malware-validation-rule - 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. divineomega/laravel-malware-validation-rule

Abandoned → [jord-jd/laravel-malware-validation-rule](/?search=jord-jd%2Flaravel-malware-validation-rule)Library[Validation &amp; Sanitization](/categories/validation)

divineomega/laravel-malware-validation-rule
===========================================

Scans uploaded files for viruses and other malware

v2.0.0(2mo ago)43951[1 PRs](https://github.com/Jord-JD/laravel-malware-validation-rule/pulls)LGPL-3.0-onlyPHPPHP &gt;=7.2CI failing

Since Mar 14Pushed 2mo agoCompare

[ Source](https://github.com/Jord-JD/laravel-malware-validation-rule)[ Packagist](https://packagist.org/packages/divineomega/laravel-malware-validation-rule)[ GitHub Sponsors](https://github.com/DivineOmega)[ RSS](/packages/divineomega-laravel-malware-validation-rule/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Laravel Malware Validation Rule
===============================

[](#laravel-malware-validation-rule)

[![Build Status](https://camo.githubusercontent.com/7c7caf10f522a4c7dc252fbb692dd99e0fc38b016a963623f00c33c220885b63/68747470733a2f2f7472617669732d63692e636f6d2f4a6f72642d4a442f6c61726176656c2d6d616c776172652d76616c69646174696f6e2d72756c652e7376673f746f6b656e3d724670664d716d44796e76637938765a37617854266272616e63683d6d6173746572)](https://travis-ci.com/Jord-JD/laravel-malware-validation-rule)

The Laravel Malware Validation Rule package provides a validation rule that scans uploaded files for viruses and other malware.

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

[](#installation)

To install the Laravel Malware Validation Rule package, run the following command

```
composer require jord-jd/laravel-malware-validation-rule
```

This package makes use of the ClamAV daemon to perform virus/malware scanning. You can install ClamAV in Ubuntu/Debian with the following command.

```
sudo apt install clamav-daemon
```

Your ClamAV installation should automatically update virus defintions. However, you can update your ClamAV virus definitions manually using the `freshclam` command. It is recommended to restart the ClamAV daemon after the virus definitions have been updated to ensure they take effect.

```
sudo freshclam
sudo service clamav-daemon restart
```

Usage
-----

[](#usage)

See the following basic usage example, which demonstrates how to validate a basic file upload does not contain contain a known virus/malware.

```
use \JordJD\LaravelMalwareValidationRule\Rules\Malware;

// ...

public function rules()
{
    return [
        'my_file' => ['required', 'file', new Malware()],
    ];
}
```

By default the validation rule message will include the name of the detected virus/malware. If you do not wish the malware name to be shown in the validation message you can turn this off as shown below.

```
public function rules()
{
    $showMalwareName = false;

    return [
        'my_file' => ['required', 'file', new Malware($showMalwareName)],
    ];
}
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance83

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~2163 days

Total

2

Last Release

87d ago

Major Versions

v1.0.0 → v2.0.02026-02-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (30 commits)")

---

Tags

laravel-packagemalwarephp-libraryvalidationvirus

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/divineomega-laravel-malware-validation-rule/health.svg)

```
[![Health](https://phpackages.com/badges/divineomega-laravel-malware-validation-rule/health.svg)](https://phpackages.com/packages/divineomega-laravel-malware-validation-rule)
```

###  Alternatives

[sunspikes/clamav-validator

Custom Laravel 5 anti-virus validator for file uploads.

3651.8M3](/packages/sunspikes-clamav-validator)[carsdotcom/laravel-json-schema

Json Schema validation for Laravel projects

1036.7k3](/packages/carsdotcom-laravel-json-schema)

PHPackages © 2026

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