Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/torralbodavid/identity-card-checker
🛂 Use this package to validate the identity card from your country using laravel validation rules.
https://github.com/torralbodavid/identity-card-checker
cif dni laravel nie rules
Last synced: 11 days ago
JSON representation
🛂 Use this package to validate the identity card from your country using laravel validation rules.
- Host: GitHub
- URL: https://github.com/torralbodavid/identity-card-checker
- Owner: torralbodavid
- License: mit
- Created: 2021-11-07T18:41:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-07T23:22:06.000Z (about 3 years ago)
- Last Synced: 2024-10-12T11:44:37.103Z (27 days ago)
- Topics: cif, dni, laravel, nie, rules
- Language: PHP
- Homepage:
- Size: 63.5 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Identity Card Checker Laravel Validation Rules
[![Latest Stable Version](http://poser.pugx.org/torralbodavid/identity-card-checker/v)](https://packagist.org/packages/torralbodavid/identity-card-checker)
[![Total Downloads](http://poser.pugx.org/torralbodavid/identity-card-checker/downloads)](https://packagist.org/packages/torralbodavid/identity-card-checker)
[![License](http://poser.pugx.org/torralbodavid/identity-card-checker/license)](https://packagist.org/packages/torralbodavid/identity-card-checker) [![PHP Version Require](http://poser.pugx.org/torralbodavid/identity-card-checker/require/php)](https://packagist.org/packages/torralbodavid/identity-card-checker)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/torralbodavid/identity-card-checker/run-tests?label=tests)](https://github.com/torralbodavid/identity-card-checker/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/torralbodavid/identity-card-checker/Check%20&%20fix%20styling?label=code%20style)](https://github.com/torralbodavid/identity-card-checker/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain)Use this package to validate the identity card number from your country
## Installation
You can install the package via composer:
```bash
composer require torralbodavid/identity-card-checker
```You can publish the config file with:
```bash
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:
```php
use Torralbodavid\IdentityCardChecker\Rules\IdCardES;
$request->validate([
...
'id_validation' => new IdCard('es'),
]);
```## Testing
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Security Vulnerabilities
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [David Torralbo](https://github.com/torralbodavid)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.