claraleigh/naughty-username
Validate that a username is not a naughty one
24,348
| Install | |
|---|---|
composer require claraleigh/naughty-username |
|
| Latest Version: | 0.3.3 |
| PHP: | 8.* |
| Laravel: | 11 · 12 · 13 |
| Older releases: | 5 – 9 |
| License: | Apache-2.0 |
| Last Updated: | Apr 29, 2026 |
| Links: | GitHub · Packagist |
Maintainer: clara_leigh
Laravel Naughty Username Validator
Installation
composer require claraleigh/naughty-username
Usage
use Claraleigh\NaughtyUsername\NaughtyUsername;
// Test if a username is naughty
$request->validate([
'username' => [
'required',
new NaughtyUsername(),
],
]);
// Use your own list of naughty usernames
$request->validate([
'username' => [
'required',
new NaughtyUsername(
['path/to/blacklist.js'],
['path/to/whitelist.js']
),
],
]);
Related Packages
jedrzej/validator-extended-syntax
Laravel 4/5 package that adds validator negation to Laravel's validation module
11,595
3
digitonic/validation
A Laravel custom validation package with some out of the box validators.
2,526
2
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 0.3.3 | 8.* | ^11.0|| | Apache-2.0 | |
| 0.3.2 | 8.* | ^11.0|| | Apache-2.0 | |
| 0.3.1 | 8.* | ^11.0 | Apache-2.0 | |
| 0.3.0 | 8.* | ^11.0 | Apache-2.0 | |
| 0.2.2 | ^7.4| | ^5.5| | Apache-2.0 | |
| 0.2.1 | ^7.4| | ^5.5| | Apache-2.0 | |
| 0.2.0 | ^7.4| | ^5.5| | Apache-2.0 | |
| 0.1 | ^7.4| | ^5.5| | Apache-2.0 |