Sha256: 576550616638c7021d7bb71a8bad97379496590d7231e1b1367443ec2298ec3b
Contents?: true
Size: 444 Bytes
Versions: 70
Compression:
Stored size: 444 Bytes
Contents
# frozen_string_literal: true module Truemail module Validate class Regex < Truemail::Validate::Base ERROR = 'email does not match the regular expression' def run return true if success(match_regex_pattern?) add_error(Truemail::Validate::Regex::ERROR) false end private def match_regex_pattern? configuration.email_pattern.match?(result.email) end end end end
Version data entries
70 entries across 70 versions & 1 rubygems