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 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
@@ -1,3 +1,3 @@
1
1
  module MagickNumbersRails
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: magick_numbers_rails
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mariusz Nosinski