diff --git a/src/Rules/UrlRule.php b/src/Rules/UrlRule.php index 30e32e0..3eacefe 100644 --- a/src/Rules/UrlRule.php +++ b/src/Rules/UrlRule.php @@ -1,7 +1,7 @@ PasswordRule::class, 'same' => SameRule::class, 'size' => SizeRule::class, - 'url' => URLRule::class, + 'url' => UrlRule::class, 'ip' => ValidIpRule::class, ]; @@ -94,7 +94,7 @@ protected static function getRules(): array */ protected static function getRule(string $alias): string { - if (isset(self::$rules[$alias])) { + if (isset(self::$rules[$alias]) && class_exists(self::$rules[$alias])) { return self::$rules[$alias]; }