Skip to content

๐Ÿ›‚ Use this package to validate the identity card from your country using laravel validation rules.

License

Notifications You must be signed in to change notification settings

torralbodavid/identity-card-checker

Repository files navigation

Identity Card Checker Laravel Validation Rules

Latest Stable Version Total Downloads License PHP Version Require GitHub Tests Action Status GitHub Code Style Action Status

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.

About

๐Ÿ›‚ Use this package to validate the identity card from your country using laravel validation rules.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Languages