Merge pull request #7814 from betagouv/fix-checkbox-mandatory-champ

Fixe le champ checkbox lorsqu'il est obligatoire et non séléctionné
This commit is contained in:
Kara Diaby 2022-09-28 11:22:36 +02:00 committed by GitHub
commit b5c4d03059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,4 +27,8 @@ class Champs::CheckboxChamp < Champs::YesNoChamp
def for_export
true? ? 'on' : 'off'
end
def mandatory_blank_and_visible?
mandatory? && (blank? || !true?)
end
end