brcpfcnpj 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/brcpfcnpj/cnpj_validator.rb +1 -1
- data/lib/brcpfcnpj/cpf_validator.rb +1 -1
- data/lib/brcpfcnpj/version.rb +1 -1
- metadata +5 -5
@@ -1,6 +1,6 @@
|
|
1
1
|
class CnpjValidator < ActiveModel::EachValidator
|
2
2
|
def validate_each(record, attribute, value)
|
3
3
|
return if value.nil?
|
4
|
-
record.errors
|
4
|
+
record.errors.add attribute, :invalid unless Cnpj.new(value).valido?
|
5
5
|
end
|
6
6
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class CpfValidator < ActiveModel::EachValidator
|
2
2
|
def validate_each(record, attribute, value)
|
3
3
|
return if value.nil?
|
4
|
-
record.errors
|
4
|
+
record.errors.add attribute, :invalid unless Cpf.new(value).valido?
|
5
5
|
end
|
6
6
|
end
|
data/lib/brcpfcnpj/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 3
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 3.0.
|
8
|
+
- 7
|
9
|
+
version: 3.0.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- "Marcos Tapaj\xC3\xB3s"
|
@@ -20,7 +20,7 @@ autorequire:
|
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
22
|
|
23
|
-
date: 2012-01-
|
23
|
+
date: 2012-01-03 00:00:00 -02:00
|
24
24
|
default_executable:
|
25
25
|
dependencies:
|
26
26
|
- !ruby/object:Gem::Dependency
|
@@ -123,7 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
123
|
requirements:
|
124
124
|
- - ">="
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
hash:
|
126
|
+
hash: -1969045908206341566
|
127
127
|
segments:
|
128
128
|
- 0
|
129
129
|
version: "0"
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
requirements:
|
133
133
|
- - ">="
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
hash:
|
135
|
+
hash: -1969045908206341566
|
136
136
|
segments:
|
137
137
|
- 0
|
138
138
|
version: "0"
|