yaroslawww/php-blocklist-check

This package is abandoned and no longer maintained. The author suggests using the think.studio/php-blocklist-check package instead.

Simple blocklist validator.

2.1.0 2023-08-19 17:15 UTC

This package is auto-updated.

Last update: 2023-08-19 17:26:03 UTC


README

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