Sha256: 6620c905d0855e7008296c81836203e98448693166a2af11a33f2a15f0b747c3
Contents?: true
Size: 241 Bytes
Versions: 13
Compression:
Stored size: 241 Bytes
Contents
class EmailValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) unless URI::MailTo::EMAIL_REGEXP.match?(value) record.errors.add attribute, (options[:message] || 'is not an email') end end end
Version data entries
13 entries across 13 versions & 1 rubygems