Metapackage for https://github.com/DivineOmega/laravel-offensive-validation-rule
laravel-validation-rules/offensive is a Laravel package for metapackage for https://github.com/divineomega/laravel-offensive-validation-rule.
It currently has 4 GitHub stars and 10 downloads on Packagist (latest version v2.0.0).
Install it with composer require laravel-validation-rules/offensive.
Discover more Laravel packages by laravel-validation-rules
or browse all Laravel packages to compare alternatives.
Last updated
This metapackage installs the maintained rule that validates that a field is not offensive. It can be useful for user-supplied data that may be displayed publicly, such as usernames or comments.
composer require laravel-validation-rules/offensive
use JordJD\LaravelOffensiveValidationRule\Offensive;
$request->validate([
'username' => ['required', new Offensive],
]);
You can also provide custom offensive-word blacklists and whitelists. See the maintained package documentation for the current extension points.
Version 2 of this metapackage uses the current jord-jd/laravel-offensive-validation-rule package and namespace. Applications that still use the legacy DivineOmega namespace should remain on version 1 until they are ready to update the import.
This project is licensed under a GNU Lesser General Public License v3.0 which you can find in this LICENSE.
If you have any feedback, comments or suggestions, please feel free to open an issue within this repository.
This package is part of the Laravel Validation Rules collection. If you're after more useful validation rules, head to the Laravel Validation Rules website.