From ab96508405042f93cc31b055bab398bf65656c75 Mon Sep 17 00:00:00 2001 From: Susan Buck Date: Mon, 29 Nov 2021 12:42:07 -0500 Subject: [PATCH] Fixed broken alphaNumericDash validation --- src/Validate.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Validate.php b/src/Validate.php index bfdb847..9108031 100644 --- a/src/Validate.php +++ b/src/Validate.php @@ -101,11 +101,7 @@ protected function alphaNumericMessage() */ protected function alphaNumericDash($value) { - if (! ctype_alnum(str_replace(' ', '', $value))) { - return false; - } - - return preg_match('/^[\pL\pM\pN_-].+$/u', $value) > 0; + return ctype_alnum(str_replace([' ', '-', '_'], '', $value)); } protected function alphaNumericDashMessage()