/ruby

Validate Swedish personal identity numbers

Primary LanguageRubyMIT LicenseMIT

personnummer Build Status

Validate personal identity numbers.

Installation

Add this to your Gemfile

gem 'personnummer', :git => 'https://github.com/personnummer/ruby.git'

Then run bundle install

Example

require 'personnummer'

puts Personnummer.valid?("8507099805")
# => True

See test/test_personnummer.rb for more examples.

License

MIT