Skip to content

Commit aefae4c

Browse files
committed
feat: update short name registration
1 parent 94a5066 commit aefae4c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/RifValidationServiceProvider.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ public function boot()
1717
$this->loadTranslationsFrom(__DIR__.'/../lang/', 'validateRif');
1818

1919
// Register custom validation rule
20-
$this->app['validator']->extend('rif', Rif::class . '@passes');
20+
$this->app['validator']->extend('rif', function ($attribute, $value, $parameters, $validator) {
21+
return (new Rif())->validate($attribute, $value, function ($message) {
22+
return $message;
23+
});
24+
});
2125
}
22-
}
26+
}

0 commit comments

Comments
 (0)