class EmailFormatValidator < ActiveModel::EachValidator
  def validate_each(object, attribute, value)
    unless value =~ /\A[^@\s]+@([^@\s\.]+\.)+[^@\s\.]+\z/
      object.errors[attribute] << (options[:message] || "enter a valid email address (e.g. name@example.com)")
    end
  end
end
class EmailFormatValidator < ActiveModel::EachValidator
  def validate_each(object, attribute, value)
    unless value =~ /\A[^`@\s]+@([^@`\s\.]+\.)+[^`@\s\.]+\z/
      object.errors[attribute] << (options[:message] || "enter a valid email address (e.g. name@example.com)")
    end
  end
end
Change email validation regex to reject backticks
Change email validation regex to reject backticks

* regex now will no accept backticks in any part of the email string
