feat(dossier): exclude conditionally invisible fields from mandatory check

This commit is contained in:
Paul Chavard 2022-06-27 11:55:56 +02:00
parent 120b593015
commit 0f9d8b6a39
7 changed files with 21 additions and 21 deletions

View file

@ -32,8 +32,8 @@ class Champs::TitreIdentiteChamp < Champ
# We dont know how to search inside documents yet
end
def mandatory_and_blank?
mandatory? && !piece_justificative_file.attached?
def mandatory_blank_and_visible?
mandatory? && !piece_justificative_file.attached? && visible?
end
def for_export