Updated package name validator

This commit is contained in:
Netkas 2022-07-26 18:59:08 -04:00
parent 13df43113a
commit 66cf9f2939

View file

@ -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;
}
}