Add authorized content type for pj

This commit is contained in:
simon lehericey 2021-01-18 12:34:52 +01:00
parent ea1b7ff129
commit d72f0c6dd2
3 changed files with 95 additions and 0 deletions

View file

@ -23,6 +23,10 @@ class Champs::PieceJustificativeChamp < Champ
size: { less_than: MAX_SIZE },
if: -> { !type_de_champ.skip_pj_validation }
validates :piece_justificative_file,
content_type: AUTHORIZED_CONTENT_TYPES,
if: -> { !type_de_champ.skip_content_type_pj_validation }
def main_value_name
:piece_justificative_file
end