emanueleminotto / naughty-validator
Symfony validator for naughty strings
1.0.1
2016-12-24 00:53 UTC
Requires
- php: ^5.6 || ^7.0
- symfony/validator: ^2.8 || ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- phpunit/phpunit: ^5.4.3
This package is auto-updated.
Last update: 2024-11-28 07:35:54 UTC
README
Symfony validator for unsafe strings, based on minimaxir/big-list-of-naughty-strings.
Install
Via Composer
$ composer require emanueleminotto/naughty-validator
Usage
use EmanueleMinotto\NaughtyValidator\NotNaughty; $constraint = new NotNaughty(); $constraint->message = 'This value is not safe.'; // use the validator to validate the value $errorList = $this ->get('validator') ->validate('<>?:"{}|_+', $constraint); $errorMessage = $errorList[0]->getMessage();
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email minottoemanuele@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.