elratauru / validate-ci
Uruguayan ID Validation for PHP
1.0
2018-08-16 23:48 UTC
Requires
- php: ^5.5 || ^7.0
This package is not auto-updated.
Last update: 2024-05-26 03:22:32 UTC
README
This library validates Cedulas de Identidad (english: ID Cards) from Uruguay.
Getting Started
Just install this library and call the class over a variable. It will return if true or false depending on the validation.
Installing
Using Composer, run:
$ composer require elratauru/validate-ci
Manually:
Copy the folder validate-ci to your project folder (I recommend using a subfolder for libraries) and require the Validator.php file.
Basic Usage
use ValidateCI\Validator;
//Create a new Validator.
$validator = new Validator();
$validation = $validator->validate('1.234.567-8');
You can check the tests/index.php for more information.
Built With
Authors
- Alfonso Carvallo - The answers you seek, lie within
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the license.md file for details
Acknowledgments
- Wikipedia, has a decent explanation of how the ID Card is validated.
- Picandocodigo for inspiration.