refactor(champ): add required?

used for the `required` html attribute. It check visibility to avoid hidden required input which prevent the form from being sent.
This commit is contained in:
simon lehericey 2022-10-17 10:05:59 +02:00 committed by LeSim
parent c94b1ce3d9
commit 528b7ec3f8
26 changed files with 35 additions and 28 deletions

View file

@ -4,7 +4,7 @@
aria: { describedby: @champ.describedby_id },
placeholder: "Numéro de dossier",
autocomplete: 'off',
required: @champ.mandatory?,
required: @champ.required?,
data: { controller: 'turbo-input', turbo_input_url_value: champs_dossier_link_path(@champ.id) },
class: "width-33-desktop"