rails_validations 1.4.1 → 2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +11 -1
- data/lib/validators/iban_validator.rb +5 -1
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 330aaf9376d310a881a52816aef78986f3f1ac05
|
4
|
+
data.tar.gz: 4648ab9ee852dedcc0feaf0974aeacbbce6d9eb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fe5adbc89c5bdf6356d55b5dd57239e9bb31e4a1f6d03d18a02c4a9f0d438ff5e5a43a3078f676e30183611c14cdf596f68dc60e9b8f67ed3f67eb89ccaacd0
|
7
|
+
data.tar.gz: 1b6eacf1c782283620fe030fed732620512c5981d1fa12620f70cee99ad0b82b1083e32263b03604762a6d79c933cdfc42462e683a932ac599f2eee964617095
|
data/README.markdown
CHANGED
@@ -88,9 +88,12 @@ Check if this is a valid IBAN account number. This uses the
|
|
88
88
|
|
89
89
|
By default we set “not a valid IBAN account number” as the error message, but we
|
90
90
|
can also set more detailed errors:
|
91
|
-
|
91
|
+
|
92
92
|
validates :iban_column, iban: { detailed_errors: true }
|
93
93
|
|
94
|
+
**Note** Since version 2.0, this gem no longer depends on iban-tools. If you
|
95
|
+
want IBAN validations, then you must add `gem iban-tools` it to your Gemfile
|
96
|
+
manually.
|
94
97
|
|
95
98
|
phone
|
96
99
|
-----
|
@@ -142,6 +145,13 @@ Currently implemented countries:
|
|
142
145
|
ChangeLog
|
143
146
|
=========
|
144
147
|
|
148
|
+
Version 2.0, 2015-08-19
|
149
|
+
-----------------------
|
150
|
+
- Don't depend on the `iban-tools gem. If you want IBAN validations, then you
|
151
|
+
must add `gem iban-tools` to your Gemfile manually (this is the only change,
|
152
|
+
but since it's incompatible I bumped the version to 2.0).
|
153
|
+
|
154
|
+
|
145
155
|
Version 1.4, 2015-08-11
|
146
156
|
-----------------------
|
147
157
|
- Make it work with Ruby 1.9 and Rails 3.0
|
@@ -1,7 +1,11 @@
|
|
1
1
|
# Check if this is a valid IBAN number; we use the +iban_tools+ gem for this.
|
2
2
|
class IbanValidator < ActiveModel::EachValidator
|
3
3
|
def validate_each record, attribute, value
|
4
|
-
|
4
|
+
begin
|
5
|
+
require 'iban-tools'
|
6
|
+
rescue LoadError
|
7
|
+
raise LoadError, 'The iban-tools gem is not installed. You need to add it to your Gemfile in order to use this validation'
|
8
|
+
end
|
5
9
|
|
6
10
|
return if value.blank?
|
7
11
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_validations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '2.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Tournoij
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -39,34 +39,35 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rspec-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
type: :
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: iban-tools
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '1.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
description: 'Extra validations for rails: date, domain, email, iban, phone, postal_code
|
68
|
+
version: '1.0'
|
69
|
+
description: 'Extra validations for rails: date, domain, email, iban, phone, postal_code,
|
70
|
+
commerce_number, vat_number'
|
70
71
|
email:
|
71
72
|
- martin@lico.nl
|
72
73
|
executables: []
|