diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py index 84fcbe973..5a239af2f 100644 --- a/src/registrar/forms/domain.py +++ b/src/registrar/forms/domain.py @@ -35,7 +35,10 @@ class DomainAddUserForm(forms.Form): email = forms.EmailField( label="Email", max_length=None, - error_messages={"invalid": ("Enter your 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, @@ -285,7 +288,7 @@ class UserForm(forms.ModelForm): "required": "Enter your title or role in your organization (e.g., Chief Information Officer)" } self.fields["email"].error_messages = { - "required": "Enter your email address in the required format, like name@example.com." + "required": "Enter an email address in the required format, like name@example.com." } self.fields["phone"].error_messages["required"] = "Enter your phone number." self.domainInfo = None @@ -342,7 +345,7 @@ class ContactForm(forms.ModelForm): "required": "Enter your title or role in your organization (e.g., Chief Information Officer)" } self.fields["email"].error_messages = { - "required": "Enter your email address in the required format, like name@example.com." + "required": "Enter an email address in the required format, like name@example.com." } self.fields["phone"].error_messages["required"] = "Enter your phone number." self.domainInfo = None @@ -458,9 +461,12 @@ class DomainOrgNameAddressForm(forms.ModelForm): validators=[ RegexValidator( "^[0-9]{5}(?:-[0-9]{4})?$|^$", - message="Enter a zip code in the required format, like 12345 or 12345-6789.", + 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: diff --git a/src/registrar/forms/domain_request_wizard.py b/src/registrar/forms/domain_request_wizard.py index 6b160b14d..f8ac85140 100644 --- a/src/registrar/forms/domain_request_wizard.py +++ b/src/registrar/forms/domain_request_wizard.py @@ -144,10 +144,10 @@ class OrganizationContactForm(RegistrarForm): validators=[ RegexValidator( "^[0-9]{5}(?:-[0-9]{4})?$|^$", - message="Enter a zip code in the form of 12345 or 12345-6789.", + message="Enter a 5-digit or 9-digit zip code, like 12345 or 12345-6789.", ) ], - error_messages={"required": ("Enter a zip code in the form of 12345 or 12345-6789.")}, + error_messages={"required": ("Enter a 5-digit or 9-digit zip code, like 12345 or 12345-6789.")}, ) urbanization = forms.CharField( required=False, @@ -233,7 +233,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, @@ -610,7 +613,8 @@ class CisaRepresentativeForm(BaseDeletableRegistrarForm): max_length=None, required=False, error_messages={ - "invalid": ("Enter your representative’s email address in the required format, like name@example.com."), + "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( diff --git a/src/registrar/forms/portfolio.py b/src/registrar/forms/portfolio.py index 14a45f6ae..999d76d51 100644 --- a/src/registrar/forms/portfolio.py +++ b/src/registrar/forms/portfolio.py @@ -17,9 +17,12 @@ class PortfolioOrgAddressForm(forms.ModelForm): validators=[ RegexValidator( "^[0-9]{5}(?:-[0-9]{4})?$|^$", - message="Enter a zip code in the required format, like 12345 or 12345-6789.", + 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: @@ -38,6 +41,7 @@ class PortfolioOrgAddressForm(forms.ModelForm): "state_territory": { "required": "Select the state, territory, or military post where your organization is located." }, + "zipcode": {"required": "Enter a 5-digit or 9-digit zip code, like 12345 or 12345-6789."}, } widgets = { # We need to set the required attributed for State/territory diff --git a/src/registrar/forms/user_profile.py b/src/registrar/forms/user_profile.py index 2a6ed4a47..8d8e2973d 100644 --- a/src/registrar/forms/user_profile.py +++ b/src/registrar/forms/user_profile.py @@ -58,7 +58,7 @@ class UserProfileForm(forms.ModelForm): "required": "Enter your title or role in your organization (e.g., Chief Information Officer)" } self.fields["email"].error_messages = { - "required": "Enter your email address in the required format, like name@example.com." + "required": "Enter an email address in the required format, like name@example.com." } self.fields["phone"].error_messages["required"] = "Enter your phone number." diff --git a/src/registrar/templates/domain_org_name_address.html b/src/registrar/templates/domain_org_name_address.html index 78baed09e..0785b6da1 100644 --- a/src/registrar/templates/domain_org_name_address.html +++ b/src/registrar/templates/domain_org_name_address.html @@ -42,7 +42,7 @@ {% input_with_errors form.state_territory %} - {% with add_class="usa-input--small" sublabel_text="Enter a zip code in the required format, like 12345 or 12345-6789." %} + {% with add_class="usa-input--small" sublabel_text="Enter a 5-digit or 9-digit zip code, like 12345 or 12345-6789." %} {% input_with_errors form.zipcode %} {% endwith %} diff --git a/src/registrar/templates/domain_request_org_contact.html b/src/registrar/templates/domain_request_org_contact.html index d4f3c2071..44b404bbf 100644 --- a/src/registrar/templates/domain_request_org_contact.html +++ b/src/registrar/templates/domain_request_org_contact.html @@ -33,7 +33,7 @@ {% input_with_errors forms.0.state_territory %} - {% with add_class="usa-input--small" sublabel_text="Enter a zip code in the required format, like 12345 or 12345-6789." %} + {% with add_class="usa-input--small" sublabel_text="Enter a 5-digit or 9-digit zip code, like 12345 or 12345-6789." %} {% input_with_errors forms.0.zipcode %} {% endwith %} diff --git a/src/registrar/templates/portfolio_organization.html b/src/registrar/templates/portfolio_organization.html index 2e6a1f488..712d1a6ca 100644 --- a/src/registrar/templates/portfolio_organization.html +++ b/src/registrar/templates/portfolio_organization.html @@ -45,7 +45,7 @@ {% input_with_errors form.address_line2 %} {% input_with_errors form.city %} {% input_with_errors form.state_territory %} - {% with add_class="usa-input--small" sublabel_text="Enter a zip code in the required format, like 12345 or 12345-6789." %} + {% with add_class="usa-input--small" sublabel_text="Enter a 5-digit or 9-digit zip code, like 12345 or 12345-6789." %} {% input_with_errors form.zipcode %} {% endwith %}