Skip to content

Commit

Permalink
Merge pull request #52 from balexand/release_2.0.1
Browse files Browse the repository at this point in the history
Release version 2.0.1
  • Loading branch information
balexand authored Mar 9, 2019
2 parents ca790de + 694c93e commit a479ff6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# HEAD

# 2.0.1

* Add email value to error details [f1sherman #50]
* CI doesn't test Ruby versions that no longer receive updates [f1sherman #51]

# 2.0.0

* Looser validation [#49]
Expand Down
2 changes: 1 addition & 1 deletion email_validator.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = %q{email_validator}
s.version = "2.0.0"
s.version = "2.0.1"
s.authors = ["Brian Alexander"]
s.description = %q{Email validator for Rails and ActiveModel.}
s.email = %q{[email protected]}
Expand Down
2 changes: 1 addition & 1 deletion lib/email_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def self.invalid?(value, options = nil)

def validate_each(record, attribute, value)
if self.class.invalid?(value)
record.errors.add(attribute, options[:message] || :invalid, value: value)
record.errors.add(attribute, :invalid, options.slice(:message).merge(value: value))
end
end
end

0 comments on commit a479ff6

Please sign in to comment.