Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Code of conduct

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages