Download the PHP package accentinteractive/disallowlister without Composer
On this page you can find all versions of the php package accentinteractive/disallowlister. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download accentinteractive/disallowlister
More information about accentinteractive/disallowlister
Files in accentinteractive/disallowlister
Package disallowlister
Short Description Test a string against a disallowlist. Useful for user forms and such.
License MIT
Homepage https://github.com/accentinteractive/disallowlister
Informations about the package disallowlister
Disallowlister
This little package tests a string against a disallowlist.
If you are looking for a Laravel-specific implementation, see https://github.com/accentinteractive/laravel-disallowlister
The isDisallowed()
method can use wildcards, like *.
Under the hood, accentinteractive/disallowtester
uses fnmatch()
, so you can use the same wildcards as in that php function (the globbing wildcard patterns):
*sex*
disallows sex, sexuality and bisexual.cycle*
disallows cycle and cycles, but not bicycle.m[o,u]m
disallows mom and mum, but allows mam.-
m?n
disallows man and men, but allows moon. - Installation
- Examples
- Config settings
Installation
You can install the package via composer:
Usage
Setting the disallowlist
You can pass the disallowlist in the constructor or via other methods.
Checking data against the disallowlist
Case sensitivity
Whole word checking
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Joost van Veen
- All Contributors
License
The MIT License (MIT). Please see License File for more information.