demarches-normaliennes/app/models/invite.rb
2018-03-06 17:18:44 +01:00

9 lines
209 B
Ruby

class Invite < ApplicationRecord
belongs_to :dossier
belongs_to :user
validates :email, presence: true
validates :email, uniqueness: { scope: :dossier_id }
validates :email, email_format: true
end