Add '$' in regex expression to correct a strange bug in preprod only (not in local??)

This commit is contained in:
Christophe Boulanger 2016-08-31 10:36:10 +02:00
parent 40b08339ae
commit 3eb0e8fc57
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class NumHouseField(forms.CharField):
if not value:
return
try:
if not re.match("[1-9][0-9]*", value):
if not re.match("^[1-9][0-9]*$", value):
raise ValueError()
except ValueError:
raise forms.ValidationError(getattr(settings, 'A2_NUMHOUSE_ERROR_MESSAGE', _('Invalid Format')))