validates_cpf 2.0.0.rc1 → 2.0.0.rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cpf_validator.rb +2 -3
- data/lib/validates_cpf/version.rb +2 -2
- metadata +4 -1
data/lib/cpf_validator.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
class CpfValidator < ActiveModel::EachValidator
|
2
2
|
def validate_each(record, attribute, value)
|
3
|
-
|
4
|
-
record.errors.add(attribute, I18n.t(key, :default => :'activerecord.errors.messages.invalid')) unless ValidatesCpf::Cpf.new(value).valid?
|
3
|
+
record.errors.add(attribute, :invalid, options) unless ValidatesCpf::Cpf.new(value).valid?
|
5
4
|
end
|
6
|
-
end
|
5
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module ValidatesCpf
|
2
|
-
VERSION = '2.0.0.
|
3
|
-
end
|
2
|
+
VERSION = '2.0.0.rc2'
|
3
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validates_cpf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.rc2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -133,6 +133,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
133
|
- - ! '>='
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
|
+
segments:
|
137
|
+
- 0
|
138
|
+
hash: -2004613854951674804
|
136
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
140
|
none: false
|
138
141
|
requirements:
|