No commit activity in last 3 years
No release in over 3 years
Vat number validator for Rails 3+ using vatlayer.com API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.1.4
~> 0.13.5
 Project Readme

vat_number_validator

Validate vat number format with vatlayer.com API

Usage

Add to your Gemfile:

gem 'vat_number_validator'

Run:

bundle install

In your config/initializers/vat_number_validator.rb:

yaml_path = 'config/vat_number_validator.yml'
VatNumberValidator::Configuration.configure yaml: yaml_path

In your config/vat_number_validator.yml:

access_key: your_vatlayer_access_key
use_https: true # use this if your vatlayer plan allows secure connection

Then add the following to your model:

validates :my_vat_number_attribute, vat_number: true