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