Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laravel-validation-rules/offensive
This rule will validate that a field isn't offensive.
https://github.com/laravel-validation-rules/offensive
laravel laravel-5-package laravel-validation offensive offensive-language php
Last synced: 3 months ago
JSON representation
This rule will validate that a field isn't offensive.
- Host: GitHub
- URL: https://github.com/laravel-validation-rules/offensive
- Owner: laravel-validation-rules
- License: lgpl-3.0
- Created: 2018-05-09T07:26:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T12:11:10.000Z (over 6 years ago)
- Last Synced: 2024-07-18T22:17:52.408Z (4 months ago)
- Topics: laravel, laravel-5-package, laravel-validation, offensive, offensive-language, php
- Size: 4.88 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Validator Rules - Offensive
This rule will validate that a field isn't offensive. It can be useful to check user supplied data that may be publicly displayed, such as usernames or comments.
## Installation
```bash
composer require laravel-validation-rules/offensive
```## Usage
```php
use DivineOmega\LaravelOffensiveValidationRule\Offensive;$request->validate([
'username' => ['required', new Offensive],
]);
```You are also able to specifiy a custom offensive word blacklist and whitelist. If you wish
to do this, check the [additional usage examples](https://github.com/DivineOmega/laravel-offensive-validation-rule#usage).## License
This project is licensed under a GNU Lesser General Public License v3.0 which you can find
[in this LICENSE](https://github.com/laravel-validation-rules/exposed-password/blob/master/LICENSE).## Feedback
If you have any feedback, comments or suggestions, please feel free to open an
issue within this repository.## Laravel Validation Rules
This package is part of the Laravel Validation Rules collection. If you're after more useful validation rules, head to the [Laravel Validation Rules](https://laravel-validation-rules.github.io/) website.