fixed some additional instances of incorrect error message

This commit is contained in:
David Kennedy 2024-10-10 06:05:53 -04:00
parent 360d0d4340
commit 616bdf2584
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
3 changed files with 15 additions and 2 deletions

View file

@ -35,7 +35,10 @@ class DomainAddUserForm(forms.Form):
email = forms.EmailField(
label="Email",
max_length=None,
error_messages={"invalid": ("Enter an email address in the required format, like name@example.com.")},
error_messages={
"invalid": ("Enter an email address in the required format, like name@example.com."),
"required": ("Enter an email address in the required format, like name@example.com.")
},
validators=[
MaxLengthValidator(
320,
@ -461,6 +464,9 @@ class DomainOrgNameAddressForm(forms.ModelForm):
message="Enter a 5-digit or 9-digit zip code, like 12345 or 12345-6789.",
)
],
error_messages={
'required': "Enter a 5-digit or 9-digit zip code, like 12345 or 12345-6789.",
}
)
class Meta:

View file

@ -226,7 +226,10 @@ class SeniorOfficialForm(RegistrarForm):
email = forms.EmailField(
label="Email",
max_length=None,
error_messages={"invalid": ("Enter an email address in the required format, like name@example.com.")},
error_messages={
"invalid": ("Enter an email address in the required format, like name@example.com."),
"required": ("Enter an email address in the required format, like name@example.com.")
},
validators=[
MaxLengthValidator(
320,
@ -604,6 +607,7 @@ class CisaRepresentativeForm(BaseDeletableRegistrarForm):
required=False,
error_messages={
"invalid": ("Enter an email address in the required format, like name@example.com."),
"required": ("Enter an email address in the required format, like name@example.com.")
},
validators=[
MaxLengthValidator(

View file

@ -20,6 +20,9 @@ class PortfolioOrgAddressForm(forms.ModelForm):
message="Enter a 5-digit or 9-digit zip code, like 12345 or 12345-6789.",
)
],
error_messages={
'required': "Enter a 5-digit or 9-digit zip code, like 12345 or 12345-6789.",
}
)
class Meta: