[Fix #3692] Add HTML5 validation to ensure SIRET length is 14
This commit is contained in:
parent
bd265c6f32
commit
7ed1e5ac82
1 changed files with 3 additions and 1 deletions
|
@ -2,7 +2,9 @@
|
||||||
placeholder: champ.libelle,
|
placeholder: champ.libelle,
|
||||||
class: 'small-margin',
|
class: 'small-margin',
|
||||||
data: { remote: true, debounce: true, url: champs_siret_path(form.index), params: { champ_id: champ&.id }.to_query, spinner: true },
|
data: { remote: true, debounce: true, url: champs_siret_path(form.index), params: { champ_id: champ&.id }.to_query, spinner: true },
|
||||||
required: champ.mandatory?
|
required: champ.mandatory?,
|
||||||
|
pattern: "[0-9]{14}",
|
||||||
|
title: "Le numéro de SIRET doit comporter exactement 14 chiffres"
|
||||||
.spinner.right-spinner.hidden
|
.spinner.right-spinner.hidden
|
||||||
%div{ class: "siret-info-#{form.index}" }
|
%div{ class: "siret-info-#{form.index}" }
|
||||||
- if champ.etablissement.present?
|
- if champ.etablissement.present?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue