gitlab-org--gitlab-foss/app/models/user_canonical_email.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
248 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class UserCanonicalEmail < ApplicationRecord
validates :canonical_email, presence: true
validates :canonical_email, format: { with: Devise.email_regexp }
belongs_to :user, inverse_of: :user_canonical_email
end