diff --git a/src/VatValidatorServiceProvider.php b/src/VatValidatorServiceProvider.php index 3d86761..db5b092 100644 --- a/src/VatValidatorServiceProvider.php +++ b/src/VatValidatorServiceProvider.php @@ -21,7 +21,7 @@ public function boot(): void */ Validator::extend('vat_number', static function ($attribute, $value, $parameters, $validator): void { $rule = new VatNumber(); - $rule->validate($attribute, $value, static fn (string $message = null): null => null); + $rule->validate($attribute, $value, static fn (?string $message = null): null => null); }); /** @@ -29,7 +29,7 @@ public function boot(): void */ Validator::extend('vat_number_exist', static function ($attribute, $value, $parameters, $validator): void { $rule = new VatNumberExist(); - $rule->validate($attribute, $value, static fn (string $message = null): null => null); + $rule->validate($attribute, $value, static fn (?string $message = null): null => null); }); /** @@ -37,7 +37,7 @@ public function boot(): void */ Validator::extend('vat_number_format', static function ($attribute, $value, $parameters, $validator): void { $rule = new VatNumberFormat(); - $rule->validate($attribute, $value, static fn (string $message = null): null => null); + $rule->validate($attribute, $value, static fn (?string $message = null): null => null); }); $this->loadTranslationsFrom(realpath(__DIR__ . '/..').'/resources/lang', 'laravelVatEuValidator');