We can match against URI::MailTo::EMAIL_REGEXP
.
def valid_email?(email)
email && email.match?(URI::MailTo::EMAIL_REGEXP)
end
We can match against URI::MailTo::EMAIL_REGEXP
.
def valid_email?(email)
email && email.match?(URI::MailTo::EMAIL_REGEXP)
end