Validates as EU VAT Number plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install http://accounts4free.rubyforge.org/svn/plugins/validates_as_eu_vat_number
Install the plugin either via script/plugin
script/plugin install http://accounts4free.rubyforge.org/svn/plugins/validates_as_eu_vat_number
or via piston
cd vendor/plugins script/plugin install http://accounts4free.rubyforge.org/svn/plugins/validates_as_eu_vat_number
Use the plugin in an ActiveRecord model as you would any other.
class Vat < ActiveRecord::Base validates_as_eu_vat_number :number, :with => :country_code end
The :with option specifies the attribute that contains the EU country the vat number belongs to. If you drop the :with option the routine expects the country code to be the first two characters of the vat number.
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: Guest, 8 months ago

