Skip to content

A shard to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya). Port of the ruby gem.

License

Notifications You must be signed in to change notification settings

picandocodigo/ci_uy.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ci_uy

ci_uy.cr

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:

    dependencies:
      ci_uy:
        github: picandocodigo/ci_uy.cr
  2. Run shards install

Usage

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 (https://github.com/your-github-user/ci_uy/fork)
  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

About

A shard to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya). Port of the ruby gem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published