From 66cf9f2939540250179dd4adc28c4b6d9561024d Mon Sep 17 00:00:00 2001 From: Netkas Date: Tue, 26 Jul 2022 18:59:08 -0400 Subject: [PATCH] Updated package name validator --- src/ncc/Utilities/Validate.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ncc/Utilities/Validate.php b/src/ncc/Utilities/Validate.php index 1adc283..14bb49c 100644 --- a/src/ncc/Utilities/Validate.php +++ b/src/ncc/Utilities/Validate.php @@ -115,18 +115,19 @@ * @param $input * @return bool */ - public static function PackageName($input): bool + public static function package($input): bool { if($input == null) { return false; } - if((bool)preg_match("/^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+[0-9a-z_]$/", $input) == false) + if((bool)preg_match(RegexPatterns::PackageNameFormat, $input) == false) { return false; } return true; } + } \ No newline at end of file