Sha256: bbd8b44a98eba1b0816e2a76970b8267c501462e9ba88aee9f85a99e12d17248
Contents?: true
Size: 241 Bytes
Versions: 4
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
4 entries across 4 versions & 1 rubygems