 module Validations   extend ActiveSupport::Concern    def email_format_validation     if self.email.present?       if !validates_format_of :email, with: email_regex         self.errors.add(:email, "doesn't exist")       end     end   end    def email_regex     /\A([^@\s]+)@((?:[-a-z0-0]+\.)+[a-z]{0,})\Z/i   end end  