demarches-normaliennes/app/components/editable_champ/phone_component/phone_component.html.haml
simon lehericey 528b7ec3f8 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.
2022-10-18 11:13:41 +02:00

9 lines
297 B
Text

-# Allowed @formats:
-# very light validation is made client-side
-# stronger validation is made server-side
= @form.phone_field :value,
id: @champ.input_id,
aria: { describedby: @champ.describedby_id },
placeholder: t(".placeholder"),
required: @champ.required?,
pattern: "[^a-z^A-Z]+"