yaroslawww / php-blocklist-check
2.1.0
2023-08-19 17:15 UTC
Requires
- php: ^8.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.16
- phpunit/phpunit: ^10.1
- vimeo/psalm: ^5.11
This package is auto-updated.
Last update: 2023-08-19 17:26:03 UTC
README
简单的黑名单验证器。
安装
通过composer安装软件包
composer require think.studio/php-blocklist-check
用法
$isAllowlisted = ( new BlocklistProcessor( [ new RegexChecker( [ '/\.hacker$/', ], [ 'email' ] ), new RegexChecker( [ // contain cyrillic '/[А-Яа-яЁё]+/u', ], [ 'title', 'first_name', 'last_name', ] ), ] ) )->passed( $user )