Skip to content

Commit

Permalink
Remove deprecated EmailValidator::EMAIL_REGEXP
Browse files Browse the repository at this point in the history
Please, use Spree::Config.default_email_regexp now.

Ref solidusio#4022
  • Loading branch information
kennyadsl committed Apr 18, 2023
1 parent c7b7fe4 commit 95bae85
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 60 deletions.
4 changes: 0 additions & 4 deletions core/lib/spree/core/validators/email.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ module Spree
# end
#
class EmailValidator < ActiveModel::EachValidator
EMAIL_REGEXP = URI::MailTo::EMAIL_REGEXP
# Use Spree::Config.default_email_regexp instead
deprecate_constant :EMAIL_REGEXP

def validate_each(record, attribute, value)
unless Spree::Config.default_email_regexp.match? value
record.errors.add(attribute, :invalid, **{ value: value }.merge!(options))
Expand Down
18 changes: 0 additions & 18 deletions core/lib/tasks/solidus/check_orders_with_invalid_email.rake

This file was deleted.

This file was deleted.

0 comments on commit 95bae85

Please sign in to comment.