From b40cc2a54e6bdc310a45044be9e8a9aa9e55daa5 Mon Sep 17 00:00:00 2001 From: mfo Date: Wed, 17 Apr 2024 07:04:51 +0200 Subject: [PATCH] feat(individual.validation): add missing strict_email validation --- app/models/individual.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/individual.rb b/app/models/individual.rb index c3d92b9eb..76257a20c 100644 --- a/app/models/individual.rb +++ b/app/models/individual.rb @@ -15,7 +15,7 @@ class Individual < ApplicationRecord if: -> { dossier.for_tiers? }, on: :update - validates :email, presence: true, if: -> { dossier.for_tiers? && self.email? }, on: :update + validates :email, strict_email: true, presence: true, if: -> { dossier.for_tiers? && self.email? }, on: :update GENDER_MALE = "M." GENDER_FEMALE = 'Mme'