[Fix #1479] Validate email format with Rails format validation
This commit is contained in:
parent
b7de632d6c
commit
e00e8ba01d
2 changed files with 32 additions and 1 deletions
|
@ -5,5 +5,5 @@ class Invite < ApplicationRecord
|
|||
validates :email, presence: true
|
||||
validates :email, uniqueness: { scope: :dossier_id }
|
||||
|
||||
validates :email, email_format: true
|
||||
validates :email, format: { with: Devise.email_regexp, message: "n'est pas valide" }, allow_nil: true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue