feat(individual.validation): add missing strict_email validation

This commit is contained in:
mfo 2024-04-17 07:04:51 +02:00
parent f6046d801f
commit b40cc2a54e

View file

@ -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'