https://github.com/picandocodigo/ci_uy.cr
A shard to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya). Port of the ruby gem.
https://github.com/picandocodigo/ci_uy.cr
Last synced: 4 months ago
JSON representation
A shard to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya). Port of the ruby gem.
- Host: GitHub
- URL: https://github.com/picandocodigo/ci_uy.cr
- Owner: picandocodigo
- License: mit
- Created: 2019-06-21T21:22:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-23T00:02:48.000Z (over 4 years ago)
- Last Synced: 2025-01-10T04:19:26.232Z (6 months ago)
- Language: Crystal
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ci_uy
[](https://github.com/picandocodigo/ci_uy.cr/actions/workflows/ci_uy.yml)A shard to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya) - A port of: https://rubygems.org/gems/ci_uy
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
ci_uy:
github: picandocodigo/ci_uy.cr
```2. Run `shards install`
## Usage
```crystal
require "ci_uy"CiUY.validate("1.111.111-1")
CiUY.validation_digit("2222222")
CiUY.random
```It receives a string (or integer) and doesn't care what you use to separate the digits, it gets the numbers from the string and checks the verification digit. So all of these formats are valid: `1.111.111-1`, `1_111_111_1`, `1.111.111/1`.
## Development
TODO: Write development instructions here
## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## Contributors
- [Fernando Briano](https://github.com/picandocodigo) - creator and maintainer