From 2a00c6c54fbe8dfa11c5c18ae2f214ee62ceed9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=99=9A=20PH=E2=91=A6=20de=20Soria=E2=84=A2=E2=99=9B?= Date: Sun, 1 Dec 2024 18:49:19 +1100 Subject: [PATCH] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ae1ee16..639bce2 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ composer require ph-7/notallowed ## 🎮 Usage -Simple example of what you can do with it :) +Simple example of what you can do with NotAllowed 🙂 ```php use PH7\NotAllowed\Ban; @@ -45,14 +45,16 @@ if (Ban::isUsername($userInput, ['root', 'sudo', 'admin'])) { echo "$userInput is not allowed"; } -// Validate if the userInput is a banned word *OR* a banned username +// Check if $userInput contains a banned word OR a banned username if (Ban::isAny($userInput, email: false, word: true, username: true)) { echo "$userInput is not allowed"; } ``` ### Extending Banned Phrases + You can supply your own values to be merged with the out-of-box banned data in 2 ways: + 1. `Ban::merge(string $scope, string | array $value)` 2. `Ban::mergeFile(string $scope, string $path)`