PHPackages                             ryangurn/laravel-bad-word - 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. ryangurn/laravel-bad-word

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

ryangurn/laravel-bad-word
=========================

Laravel bad word validation rule

1.0.0(7y ago)05MITPHPPHP &gt;=5.4.0

Since Jan 19Pushed 4y agoCompare

[ Source](https://github.com/ryangurn/laravel-bad-word)[ Packagist](https://packagist.org/packages/ryangurn/laravel-bad-word)[ RSS](/packages/ryangurn-laravel-bad-word/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Laravel Bad Word
================

[](#laravel-bad-word)

This package adds a "bad\_word" validation rule which check for profanity and any words you want to add to check against!

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

[](#installation)

This package can be used in Laravel 5.0 or higher.

You can install the package via composer:

```
composer require patoui/laravel-bad-word

```

In Laravel 5.5 the service provider will automatically get registered. For older versions of the framework, add the service provider in config/app.php file:

```
'providers' => [
    // ...
    Patoui\LaravelBadWord\BadWordServiceProvider::class,
];

```

Usage
-----

[](#usage)

For all languages use the following

```
'field_name' => 'bad_word'
```

For a specific language(s), the syntax is as shown in the snippet below (you may select any array key found in the config)

```
'field_name' => 'bad_word:en,fr' // english and french only
```

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

[](#configuration)

To publish the configuration file to `config/bad-word.php`

```
php artisan vendor:publish --provider="Patoui\LaravelBadWord\BadWordServiceProvider"

```

You may add your own language keys as needed

```
'dothraki' => ['Mel ase']

// can be referenced in validation
'field_name' => 'bad_word:dothraki'

```

Be sure to add a validation message to your `validation.php` file

```
'bad_word' => 'The :attribute cannot contain bad words.',
```

### Contributions

[](#contributions)

Any contributions are welcome!

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65% 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

Unknown

Total

1

Last Release

2671d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/153dfe222de16ba561e12763501afcd3482b0bf38f96ebb2fba7247465edcd66?d=identicon)[ryangurn](/maintainers/ryangurn)

---

Top Contributors

[![patoui](https://avatars.githubusercontent.com/u/4511175?v=4)](https://github.com/patoui "patoui (13 commits)")[![ryangurn](https://avatars.githubusercontent.com/u/1297082?v=4)](https://github.com/ryangurn "ryangurn (7 commits)")

---

Tags

laravelvalidationwordprofanitybadpatoui

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ryangurn-laravel-bad-word/health.svg)

```
[![Health](https://phpackages.com/badges/ryangurn-laravel-bad-word/health.svg)](https://phpackages.com/packages/ryangurn-laravel-bad-word)
```

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M107](/packages/propaganistas-laravel-phone)[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

759569.4k13](/packages/wendelladriel-laravel-validated-dto)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

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

PHPackages © 2026

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