Skip to content

rghorbani/iranian-ssn-gem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iranian-SSN

Iranian-SSN lets you validate iranian national code. It checks the code and returns the result as ruby hashmap.

A short example:

require 'iranian-ssn'
Iranian::SSN.validate('#ssn')
# => {"valid"=>true, "ssn"=>"#ssn", "city_code"=>"044", "city"=>"شمیران", "state"=>"تهران"}
# => {"valid"=>false, "erorr"=>"SSN is not valid."}
# => {"valid"=>false, "erorr"=>"SSN is empty."}

Installation

$ gem install iranian-ssn

License

Copyright (c) 2015 Reza Ghorbani Farid.

Released under the MIT license. See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages