Skip to content

dev-think-one/php-blocklist-check

Repository files navigation

PHP block list check.

Packagist License Packagist Version Total Downloads Build Status Code Coverage Scrutinizer Code Quality

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 )

Credits

  • Think Studio

About

Simple blocklist validator for php.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages