Skip to content

Commit

Permalink
Ajout d'une verification côté client du format du numéro de fiche
Browse files Browse the repository at this point in the history
  • Loading branch information
alanzirek committed Jun 28, 2024
1 parent 75f9ac0 commit be3293c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sv/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@


class FicheDetectionSearchForm(forms.Form, DSFRFormMixin):
numero = forms.CharField(label="Numéro", required=False)
numero = forms.CharField(
label="Numéro",
required=False,
widget=forms.TextInput(attrs={"pattern": "^[0-9]{4}\\.[0-9]+$", "title": "Format attendu : ANNEE.NUMERO"}),
)
region = forms.ModelChoiceField(label="Région", queryset=Region.objects.all(), required=False)
organisme_nuisible = forms.ModelChoiceField(
label="Organisme", queryset=OrganismeNuisible.objects.all(), required=False
Expand Down

0 comments on commit be3293c

Please sign in to comment.