-
Notifications
You must be signed in to change notification settings - Fork 0
This plugin provides the Nip class to check the NIP number.
License
macuk/nip-plugin
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Nip === This plugin provides the Nip class to check the NIP number. NIP (Numer Identyfikacji Podatkowej) is the Polish Tax Identification Number. More information (in Polish language): http://pl.wikipedia.org/wiki/NIP Installation ============ script/plugin install git://github.com/macuk/nip.git Example ======= Standalone class: nip = Nip.new('845-167-08-82') nip.valid? # true nip.to_s # '8451670882' ActiveRecord: class Company < ActiveRecord::Base validate :check_nip private def check_nip n = Nip.new(nip) message = 'Invalid NIP number' errors.add(:nip, message) unless n.valid? end end Copyright (c) 2010 Piotr Macuk, released under the MIT license
About
This plugin provides the Nip class to check the NIP number.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published