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

Abandoned → [jord-jd/laravel-offensive-validation-rule](/?search=jord-jd%2Flaravel-offensive-validation-rule)Library

divineomega/laravel-offensive-validation-rule
=============================================

Laravel validation rule that checks if a string is offensive.

v2.0.0(2mo ago)132631LGPL-3.0-onlyPHPPHP ^7.2 || ^8.0CI failing

Since May 7Pushed 2mo agoCompare

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

READMEChangelog (5)Dependencies (3)Versions (6)Used By (1)

🤬🤭 Laravel Offensive Validation Rule
====================================

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

This package provides a Laravel validation rule that checks if a string is offensive. It can be useful to check user supplied data that may be publicly displayed, such as usernames or comments.

[![Laravel Offensive Validation Rule usage](assets/images/laravel-offensive-validation-rule-usage.png)](assets/images/laravel-offensive-validation-rule-usage.png)

 [ ![](https://camo.githubusercontent.com/16a6fc23aaa3176f295620f5fb30d7692a253f801b3898d04135f8ee9a4f3cbc/68747470733a2f2f7472617669732d63692e6f72672f4a6f72642d4a442f6c61726176656c2d6f6666656e736976652d76616c69646174696f6e2d72756c652e7376673f6272616e63683d6d6173746572) ](https://travis-ci.org/Jord-JD/laravel-offensive-validation-rule) [ ![Coverage Status](https://camo.githubusercontent.com/b2c0779d36792dcad9bc0e304888ba387eaf8348cc88a5a4f09c7a7817609a24/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4a6f72642d4a442f6c61726176656c2d6f6666656e736976652d76616c69646174696f6e2d72756c652f62616467652e7376673f6272616e63683d6d6173746572) ](https://coveralls.io/github/Jord-JD/laravel-offensive-validation-rule?branch=master) [ ![StyleCI](https://camo.githubusercontent.com/3d3bd529d0ec1a13020a6ca89f7bcb2ad290f19a1feb17e43a135f862e02fe56/68747470733a2f2f7374796c6563692e696f2f7265706f732f3133323436303632312f736869656c643f6272616e63683d6d6173746572) ](https://styleci.io/repos/132460621)

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

[](#installation)

To install, just run the following Composer command.

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

```

Please note that this package requires Laravel 5.5 or above.

Usage
-----

[](#usage)

The following code snippet shows an example of how to use the offensive validation rule.

```
use JordJD\LaravelOffensiveValidationRule\Offensive;

$request->validate([
    'username' => ['required', new Offensive],
]);
```

### Custom word lists

[](#custom-word-lists)

If the defaults are too strict (or not strict enough), you can optionally specify a custom list of offensive words and custom whitelist. Below is an example of using a custom blacklist and whitelist.

```
use JordJD\LaravelOffensiveValidationRule\Offensive;
use JordJD\IsOffensive\OffensiveChecker;

$blacklist = ['moist', 'stinky', 'poo'];
$whitelist = ['poop'];

$request->validate([
    'username' => ['required', new Offensive(new OffensiveChecker($blacklist, $whitelist))],
]);
```

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance83

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 97.2% 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 ~710 days

Total

5

Last Release

87d ago

Major Versions

v1.3.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 (35 commits)")[![marcreichel](https://avatars.githubusercontent.com/u/7645035?v=4)](https://github.com/marcreichel "marcreichel (1 commits)")

---

Tags

laravellaravel-5-packagelaravel-validationoffensiveoffensive-languagephp

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[timokoerber/laravel-one-time-operations

Run operations once after deployment - just like you do it with migrations!

6481.7M11](/packages/timokoerber-laravel-one-time-operations)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[wnx/laravel-sends

Keep track of outgoing emails in your Laravel application.

200427.3k](/packages/wnx-laravel-sends)[illuminate/process

The Illuminate Process package.

44699.5k65](/packages/illuminate-process)

PHPackages © 2026

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