Sha256: 0bd871fb8dcfb2a2029173ccff1ac54adacecc8e4a9daacafeafa461e0e84ae4

Contents?: true

Size: 348 Bytes

Versions: 11

Compression:

Stored size: 348 Bytes

Contents

class EmailValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    warn "`EmailValidator` in 'lib/spree/core' is deprecated. Use `EmailValidator` in 'app/validators' instead."
    unless value =~ /\A[^@\s]+@[^@\s]+\z/
      record.errors.add(attribute, :invalid, { value: value }.merge!(options))
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
spree_core-3.6.6 lib/spree/core/validators/email.rb
spree_core-3.6.5 lib/spree/core/validators/email.rb
spree_core-3.6.4 lib/spree/core/validators/email.rb
spree_core-3.6.3 lib/spree/core/validators/email.rb
spree_core-3.6.2 lib/spree/core/validators/email.rb
spree_core-3.6.1 lib/spree/core/validators/email.rb
spree_core-3.6.0 lib/spree/core/validators/email.rb
spree_core-3.5.0 lib/spree/core/validators/email.rb
spree_core-3.6.0.rc1 lib/spree/core/validators/email.rb
spree_core-3.5.0.rc2 lib/spree/core/validators/email.rb
spree_core-3.5.0.rc1 lib/spree/core/validators/email.rb