claraleigh / naughty-username
Validate that a username is not a naughty one
Installs: 5 057
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: 8.*
- laravel/framework: ^11.0
Requires (Dev)
- phpunit/phpunit: 6.2.*|^8.5.8|^9.3.3|^10.0.0
README
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'] ), ], ]);