[Fix #1479] Sanitize email format for invite
This commit is contained in:
parent
e00e8ba01d
commit
5650c4aefe
1 changed files with 4 additions and 0 deletions
|
@ -1,7 +1,11 @@
|
|||
class Invite < ApplicationRecord
|
||||
include EmailSanitizableConcern
|
||||
|
||||
belongs_to :dossier
|
||||
belongs_to :user
|
||||
|
||||
before_validation -> { sanitize_email(:email) }
|
||||
|
||||
validates :email, presence: true
|
||||
validates :email, uniqueness: { scope: :dossier_id }
|
||||
|
||||
|
|
Loading…
Reference in a new issue