emanueleminotto / naughty-validator
Symfony字符串验证器,用于检测不雅字符串
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-08-28 07:11:31 UTC
README
Symfony不安全字符串验证器,基于 minimaxir/big-list-of-naughty-strings。
安装
通过Composer
$ composer require emanueleminotto/naughty-validator
使用方法
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();
变更日志
请参阅 CHANGELOG 了解最近更改的详细信息。
测试
$ composer test
贡献
请参阅 CONTRIBUTING 和 CONDUCT 了解详细信息。
安全
如果您发现任何与安全相关的问题,请通过电子邮件 minottoemanuele@gmail.com 而不是使用问题跟踪器。
鸣谢
许可证
MIT许可证(MIT)。请参阅 许可证文件 了解更多信息。