magick_numbers_rails 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +33 -0
- data/lib/magick_numbers_rails/version.rb +1 -1
- metadata +1 -1
data/README.markdown
CHANGED
@@ -0,0 +1,33 @@
|
|
1
|
+
### MAGICK NUMBERS RAILS
|
2
|
+
|
3
|
+
This gem is wrapper on [magic_numbers](http://github.com/marioosh/magick_numbers) library that validates such numbers as:
|
4
|
+
|
5
|
+
- NIP (Polish Tax Identification Number)
|
6
|
+
- PESEL (Polish ID Number)
|
7
|
+
- REGON (Polish Company Identification Number)
|
8
|
+
|
9
|
+
in the future:
|
10
|
+
- VIN
|
11
|
+
- EAN
|
12
|
+
- IBAN
|
13
|
+
|
14
|
+
###Instalation
|
15
|
+
|
16
|
+
In your Gemfile add:
|
17
|
+
|
18
|
+
gem 'magick_numbers_rails'
|
19
|
+
|
20
|
+
###Example:
|
21
|
+
|
22
|
+
For standalone model use [magick_numbers](http://github.com/marioosh/magick_numbers) library
|
23
|
+
|
24
|
+
For ActiveRecord Models:
|
25
|
+
|
26
|
+
class Item < ActiveRecord::Base
|
27
|
+
validates :nip, :presence => true, :nip => true
|
28
|
+
end
|
29
|
+
|
30
|
+
###TODO:
|
31
|
+
|
32
|
+
- I18n messages
|
33
|
+
- validators for other numbers
|