diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index ac941ec..78be820 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -26,12 +26,10 @@ public function boot(): void private function registerRules(): void { - $validator = $this->app->make(Validator::class); - foreach ($this->rules as $rule) { $rule = $this->app->make($rule); $alias = $rule->getAlias(); - $validator->extend($alias, $rule . '@passes', $rule->message()); + Validator::extend($alias, $rule . '@passes', $rule->message()); } } }