Repository: cisagov/manage.get.gov

Issue:
Unable to remove the first or second element on nameservers page
### Current Behavior

If you try to delete the first or second nameserver, even with more than 2 nameservers on that page, you are unable to do so because the page is marking the first two boxes as required. 

### Expected Behavior

You should be able to delete the first two nameservers if you already entered more than 2 nameservers.

For **refinement**: do we want to allow the first two nameservers to always be deletable? If we did, a warning pop-up should occur as that will take their domain offline, so if we want to allow that it should be another ticket. 
Result of refinement: DO NOT do a pop-up, and don't allow the first two nameservers to always be deletable. Just only allow delete if they have more than 2 nameservers prior to the delete. 

Additional acceptance criteria:
- [ ] Amend error message with clarifying text to indicate that at least 2 NS are required.

### Steps to Reproduce

1.Go to the nameservers page for a domain
2. fill in 2 or more nameservers
3. try to delete the first or second nameserver
4. notice you are unable to. 


### Environment

_No response_

### Additional Context

![image](https://github.com/cisagov/getgov/assets/109625347/1e0ee818-5174-40d7-bb40-9dad7903ef86)


### Issue Links

_No response_


Discussion:

Resolving patch:
diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py
--- a/src/registrar/forms/domain.py
+++ b/src/registrar/forms/domain.py
@@ -23,11 +23,6 @@ class DomainAddUserForm(forms.Form):
     email = forms.EmailField(label="Email")
 
 
-class IPAddressField(forms.CharField):
-    def validate(self, value):
-        super().validate(value)  # Run the default CharField validation
-
-
 class DomainNameserverForm(forms.Form):
     """Form for changing nameservers."""
 
@@ -35,7 +30,21 @@ class DomainNameserverForm(forms.Form):
 
     server = forms.CharField(label="Name server", strip=True)
 
-    ip = forms.CharField(label="IP Address (IPv4 or IPv6)", strip=True, required=False)
+    ip = forms.CharField(
+        label="IP address (IPv4 or IPv6)",
+        strip=True,
+        required=False,
+    )
+
+    def __init__(self, *args, **kwargs):
+        super(DomainNameserverForm, self).__init__(*args, **kwargs)
+
+        # add custom error messages
+        self.fields["server"].error_messages.update(
+            {
+                "required": "A minimum of 2 name servers are required.",
+            }
+        )
 
     def clean(self):
         # clean is called from clean_forms, which is called from is_valid
diff --git a/src/registrar/utility/errors.py b/src/registrar/utility/errors.py
--- a/src/registrar/utility/errors.py
+++ b/src/registrar/utility/errors.py
@@ -39,9 +39,11 @@ class GenericError(Exception):
     """
 
     _error_mapping = {
-        GenericErrorCodes.CANNOT_CONTACT_REGISTRY: (
-            "Update failed. Cannot contact the registry."
-        ),
+        GenericErrorCodes.CANNOT_CONTACT_REGISTRY: """
+We’re experiencing a system connection error. Please wait a few minutes
+and try again. If you continue to receive this error after a few tries,
+contact help@get.gov
+        """,
         GenericErrorCodes.GENERIC_ERROR: ("Value entered was wrong."),
     }
 


Test patch:
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -1464,7 +1464,12 @@ def test_domain_nameservers_form_submit_one_nameserver(self):
         # form submission was a post with an error, response should be a 200
         # error text appears twice, once at the top of the page, once around
         # the required field.  form requires a minimum of 2 name servers
-        self.assertContains(result, "This field is required.", count=2, status_code=200)
+        self.assertContains(
+            result,
+            "A minimum of 2 name servers are required.",
+            count=2,
+            status_code=200,
+        )
 
     def test_domain_nameservers_form_submit_subdomain_missing_ip(self):
         """Nameserver form catches missing ip error on subdomain.
@@ -1632,7 +1637,12 @@ def test_domain_nameservers_form_invalid(self):
         # form submission was a post with an error, response should be a 200
         # error text appears four times, twice at the top of the page,
         # once around each required field.
-        self.assertContains(result, "This field is required", count=4, status_code=200)
+        self.assertContains(
+            result,
+            "A minimum of 2 name servers are required.",
+            count=4,
+            status_code=200,
+        )
 
 
 class TestDomainAuthorizingOfficial(TestDomainOverview):
@@ -1800,7 +1810,11 @@ def test_security_email_form_messages(self):
             (
                 "RegistryError",
                 form_data_registry_error,
-                "Update failed. Cannot contact the registry.",
+                """
+We’re experiencing a system connection error. Please wait a few minutes
+and try again. If you continue to receive this error after a few tries,
+contact help@get.gov
+                """,
             ),
             ("ContactError", form_data_contact_error, "Value entered was wrong."),
             (
@@ -1835,7 +1849,7 @@ def test_security_email_form_messages(self):
             self.assertEqual(len(messages), 1)
             message = messages[0]
             self.assertEqual(message.tags, message_tag)
-            self.assertEqual(message.message, expected_message)
+            self.assertEqual(message.message.strip(), expected_message.strip())
 
     def test_domain_overview_blocked_for_ineligible_user(self):
         """We could easily duplicate this test for all domain management