Project

validiso

0.0
No commit activity in last 3 years
No release in over 3 years
Validate ISO country and Code
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 10.0
 Project Readme

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.