Use this package to validate the identity card number from your country
You can install the package via composer:
composer require torralbodavid/identity-card-checker
You can publish the config file with:
php artisan vendor:publish --provider="Torralbodavid\IdentityCardChecker\IdentityCardCheckerServiceProvider" --tag="identity-card-checker-config"
๐ช๐ธ Currently we are only supporting validation of Spanish documents: DNI, NIE and CIF.
Feel free to open an issue if you want your country id to be supported or also open a pull request.
Add the following rule on your form validation:
use Torralbodavid\IdentityCardChecker\Rules\IdCardES;
$request->validate([
...
'id_validation' => new IdCard('es'),
]);
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email davidtorralboperez@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.