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:
commit
b5c4d03059
1 changed files with 4 additions and 0 deletions
|
@ -27,4 +27,8 @@ class Champs::CheckboxChamp < Champs::YesNoChamp
|
||||||
def for_export
|
def for_export
|
||||||
true? ? 'on' : 'off'
|
true? ? 'on' : 'off'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def mandatory_blank_and_visible?
|
||||||
|
mandatory? && (blank? || !true?)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue