yaroslawww / php-blocklist-check
Simple blocklist validator.
Installs: 35
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/yaroslawww/php-blocklist-check
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
Simple blocklist validator.
Installation
Install the package via composer:
composer require think.studio/php-blocklist-check
Usage
$isAllowlisted = ( new BlocklistProcessor( [ new RegexChecker( [ '/\.hacker$/', ], [ 'email' ] ), new RegexChecker( [ // contain cyrillic '/[А-Яа-яЁё]+/u', ], [ 'title', 'first_name', 'last_name', ] ), ] ) )->passed( $user )