mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-04 02:03:32 +02:00
Fix zip code message
This commit is contained in:
parent
6f1642eaf2
commit
7e4192178c
3 changed files with 3 additions and 3 deletions
|
@ -262,7 +262,7 @@ class OrganizationContactForm(RegistrarForm):
|
||||||
validators=[
|
validators=[
|
||||||
RegexValidator(
|
RegexValidator(
|
||||||
"^[0-9]{5}(?:-[0-9]{4})?$|^$",
|
"^[0-9]{5}(?:-[0-9]{4})?$|^$",
|
||||||
message="Enter a zip code in the form of 12345 or 12345-6789.",
|
message="Enter a zip code in the required format, like 12345 or 12345-6789.",
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -239,7 +239,7 @@ class DomainOrgNameAddressForm(forms.ModelForm):
|
||||||
validators=[
|
validators=[
|
||||||
RegexValidator(
|
RegexValidator(
|
||||||
"^[0-9]{5}(?:-[0-9]{4})?$|^$",
|
"^[0-9]{5}(?:-[0-9]{4})?$|^$",
|
||||||
message="Enter a zip code in the form of 12345 or 12345-6789.",
|
message="Enter a zip code in the required format, like 12345 or 12345-6789.",
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -30,7 +30,7 @@ class TestFormValidation(MockEppLib):
|
||||||
form = OrganizationContactForm(data={"zipcode": "nah"})
|
form = OrganizationContactForm(data={"zipcode": "nah"})
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
form.errors["zipcode"],
|
form.errors["zipcode"],
|
||||||
["Enter a zip code in the form of 12345 or 12345-6789."],
|
["Enter a zip code in the required format, like 12345 or 12345-6789."],
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_org_contact_zip_valid(self):
|
def test_org_contact_zip_valid(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue