demarches-normaliennes/app/models/invite.rb

10 lines
209 B
Ruby
Raw Normal View History

2018-03-06 13:44:29 +01:00
class Invite < ApplicationRecord
belongs_to :dossier
belongs_to :user
2018-03-06 13:44:29 +01:00
validates :email, presence: true
validates :email, uniqueness: { scope: :dossier_id }
validates :email, email_format: true
end