diff --git a/app/models/champs/civilite_champ.rb b/app/models/champs/civilite_champ.rb index 00e1eb247..7b4d9df1c 100644 --- a/app/models/champs/civilite_champ.rb +++ b/app/models/champs/civilite_champ.rb @@ -1,5 +1,8 @@ class Champs::CiviliteChamp < Champ - validates :value, inclusion: ["M.", "Mme"], allow_nil: true, allow_blank: false + validates :value, inclusion: ["M.", "Mme"], + allow_nil: true, + allow_blank: false, + if: -> { validate_champ_value? || validation_context == :prefill } def legend_label? true