Skip to content

jackbit/validiso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Validiso

Validate ISO Countries by Code, Alpha2 or Alpha3

Installation

Add this line to your application's Gemfile:

gem 'validiso'

And then execute:

$ bundle

Or install it yourself as:

$ gem install validiso

Usage

Search by code

Validiso::Countries.find_code('971')

Search by alpha2

Validiso::Countries.find_alpha2('AE')

Search by alpha3

Validiso::Countries.find_alpha3('ARE')

It will return nil if not exist, but if success it will return the following object

  {
    "country_code": "971",
    "alpha2": "AE",
    "alpha3": "ARE",
    "name": "United Arab Emirates",
    "continent": "Asia"
  }

License

The gem is available as open source under the terms of the MIT License.

About

Validate ISO countries by code, alpha2, alpha3

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages