torralbodavid / identity-card-checker
Use this package to validate the identity card number from your country
Fund package maintenance!
torralbodavid
Requires
- php: ^8.0
- illuminate/contracts: ^8.37
- spatie/laravel-package-tools: ^1.4.3
Requires (Dev)
- nunomaduro/collision: ^5.3
- nunomaduro/larastan: ^1.0
- orchestra/testbench: ^6.15
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.3
This package is auto-updated.
Last update: 2024-11-08 05:57:21 UTC
README
Use this package to validate the identity card number from your country
Installation
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"
Usage
🇪🇸 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'), ]);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
If you discover any security related issues, please email davidtorralboperez@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.