If you use devise for user authentication you can uncomment code in devise.rb
# Email regex used to validate email formats. It simply asserts that
# one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
# config.email_regexp = /\A[^@]+@[^@]+\z/
otherwise i think you can write like
in model
validates :email, uniqueness: true
validate :email_regex
def email_regex
if email.present? and not email.match(/\A[^@]+@[^@]+\z/)
errors.add :email, "This is not a valid email format"
end
end