0.0
No commit activity in last 3 years
No release in over 3 years
This gem helps you to check whether a Bulgarian EIK number is valid or not.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.0

Runtime

 Project Readme

EikValidator

This gem allows you to validate whether a Bulgarian EIK (UIC - Unique Identifier Code) is valid or not. It follows the algorhitm described here.

Installation

Add this line to your application's Gemfile:

gem 'eik_validator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install eik_validator

Usage

The usage is pretty straightforward:

EikValidator.validate('123456789') # => false
EikValidator.validate('020469788') # => true

EikValidator.validate('1234567891234') # => false
EikValidator.validate('1213961230342') # => true

Or if you want to use it inside a model:

validates :field_name, eik: true

Changelog

[0.0.4] - 2015-02-06

  • Fixed a dependency typo.

[0.0.3] - 2015-02-06 [YANKED]

  • Added ActiveModel validation support.

[0.0.1] - 2015-02-05

  • Initial release.

Contributing

This is my first gem ever so suggestions are more that appreciated. Bug reports and pull requests are welcome on GitHub at https://github.com/veskoy/eik_validator.