mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 21:19:42 +02:00
Merge pull request #1908 from cisagov/za/1651-increase-character-limit
Ticket #1651: Increase character limit of text fields
This commit is contained in:
commit
03aa034da3
5 changed files with 68 additions and 15 deletions
|
@ -319,8 +319,8 @@ class AboutYourOrganizationForm(RegistrarForm):
|
||||||
widget=forms.Textarea(),
|
widget=forms.Textarea(),
|
||||||
validators=[
|
validators=[
|
||||||
MaxLengthValidator(
|
MaxLengthValidator(
|
||||||
1000,
|
2000,
|
||||||
message="Response must be less than 1000 characters.",
|
message="Response must be less than 2000 characters.",
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
error_messages={"required": ("Enter more information about your organization.")},
|
error_messages={"required": ("Enter more information about your organization.")},
|
||||||
|
@ -515,8 +515,8 @@ class PurposeForm(RegistrarForm):
|
||||||
widget=forms.Textarea(),
|
widget=forms.Textarea(),
|
||||||
validators=[
|
validators=[
|
||||||
MaxLengthValidator(
|
MaxLengthValidator(
|
||||||
1000,
|
2000,
|
||||||
message="Response must be less than 1000 characters.",
|
message="Response must be less than 2000 characters.",
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
error_messages={"required": "Describe how you’ll use the .gov domain you’re requesting."},
|
error_messages={"required": "Describe how you’ll use the .gov domain you’re requesting."},
|
||||||
|
@ -830,8 +830,8 @@ class AnythingElseForm(RegistrarForm):
|
||||||
widget=forms.Textarea(),
|
widget=forms.Textarea(),
|
||||||
validators=[
|
validators=[
|
||||||
MaxLengthValidator(
|
MaxLengthValidator(
|
||||||
1000,
|
2000,
|
||||||
message="Response must be less than 1000 characters.",
|
message="Response must be less than 2000 characters.",
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block form_fields %}
|
{% block form_fields %}
|
||||||
{% with attr_maxlength=1000 add_label_class="usa-sr-only" %}
|
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
|
||||||
{% input_with_errors forms.0.about_your_organization %}
|
{% input_with_errors forms.0.about_your_organization %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
|
|
||||||
{% block form_fields %}
|
{% block form_fields %}
|
||||||
{% with add_label_class="usa-sr-only" attr_maxlength=1000 %}
|
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
|
||||||
{% input_with_errors forms.0.anything_else %}
|
{% input_with_errors forms.0.anything_else %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block form_fields %}
|
{% block form_fields %}
|
||||||
{% with attr_maxlength=1000 add_label_class="usa-sr-only" %}
|
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
|
||||||
{% input_with_errors forms.0.purpose %}
|
{% input_with_errors forms.0.purpose %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -226,7 +226,7 @@ class TestFormValidation(MockEppLib):
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_purpose_form_character_count_invalid(self):
|
def test_purpose_form_character_count_invalid(self):
|
||||||
"""Response must be less than 1000 characters."""
|
"""Response must be less than 2000 characters."""
|
||||||
form = PurposeForm(
|
form = PurposeForm(
|
||||||
data={
|
data={
|
||||||
"purpose": "Bacon ipsum dolor amet fatback strip steak pastrami"
|
"purpose": "Bacon ipsum dolor amet fatback strip steak pastrami"
|
||||||
|
@ -247,15 +247,33 @@ class TestFormValidation(MockEppLib):
|
||||||
"cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
|
"cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
|
||||||
"beef ribs rump jowl tenderloin swine sausage biltong"
|
"beef ribs rump jowl tenderloin swine sausage biltong"
|
||||||
"bacon rump tail boudin meatball boudin meatball boudin."
|
"bacon rump tail boudin meatball boudin meatball boudin."
|
||||||
|
"Bacon ipsum dolor amet fatback strip steak pastrami"
|
||||||
|
"shankle, drumstick doner chicken landjaeger turkey andouille."
|
||||||
|
"Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
|
||||||
|
"ground round strip steak, jowl tail chuck ribeye bacon"
|
||||||
|
"beef ribs swine filet ball tip pancetta strip steak sirloin"
|
||||||
|
"mignon ham spare ribs rump. Tail shank biltong beef ribs doner"
|
||||||
|
"buffalo swine bacon. Tongue cow picanha brisket bacon chuck"
|
||||||
|
"leberkas pork loin pork, drumstick capicola. Doner short loin"
|
||||||
|
"ground round fatback turducken chislic shoulder turducken"
|
||||||
|
"spare ribs, burgdoggen kielbasa kevin frankfurter ball tip"
|
||||||
|
"pancetta cupim. Turkey meatball andouille porchetta hamburger"
|
||||||
|
"pork chop corned beef. Brisket short ribs turducken, pork chop"
|
||||||
|
"chislic turkey ball pork chop leberkas rump, rump bacon, jowl"
|
||||||
|
"tip ham. Shankle salami tongue venison short ribs kielbasa"
|
||||||
|
"tri-tip ham hock swine hamburger. Flank meatball corned beef"
|
||||||
|
"cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
|
||||||
|
"beef ribs rump jowl tenderloin swine sausage biltong"
|
||||||
|
"bacon rump tail boudin meatball boudin meatball boudin."
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
form.errors["purpose"],
|
form.errors["purpose"],
|
||||||
["Response must be less than 1000 characters."],
|
["Response must be less than 2000 characters."],
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_anything_else_form_about_your_organization_character_count_invalid(self):
|
def test_anything_else_form_about_your_organization_character_count_invalid(self):
|
||||||
"""Response must be less than 1000 characters."""
|
"""Response must be less than 2000 characters."""
|
||||||
form = AnythingElseForm(
|
form = AnythingElseForm(
|
||||||
data={
|
data={
|
||||||
"anything_else": "Bacon ipsum dolor amet fatback strip steak pastrami"
|
"anything_else": "Bacon ipsum dolor amet fatback strip steak pastrami"
|
||||||
|
@ -276,15 +294,32 @@ class TestFormValidation(MockEppLib):
|
||||||
"cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
|
"cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
|
||||||
"beef ribs rump jowl tenderloin swine sausage biltong"
|
"beef ribs rump jowl tenderloin swine sausage biltong"
|
||||||
"bacon rump tail boudin meatball boudin meatball boudin."
|
"bacon rump tail boudin meatball boudin meatball boudin."
|
||||||
|
"shankle, drumstick doner chicken landjaeger turkey andouille."
|
||||||
|
"Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
|
||||||
|
"ground round strip steak, jowl tail chuck ribeye bacon"
|
||||||
|
"beef ribs swine filet ball tip pancetta strip steak sirloin"
|
||||||
|
"mignon ham spare ribs rump. Tail shank biltong beef ribs doner"
|
||||||
|
"buffalo swine bacon. Tongue cow picanha brisket bacon chuck"
|
||||||
|
"leberkas pork loin pork, drumstick capicola. Doner short loin"
|
||||||
|
"ground round fatback turducken chislic shoulder turducken"
|
||||||
|
"spare ribs, burgdoggen kielbasa kevin frankfurter ball tip"
|
||||||
|
"pancetta cupim. Turkey meatball andouille porchetta hamburger"
|
||||||
|
"pork chop corned beef. Brisket short ribs turducken, pork chop"
|
||||||
|
"chislic turkey ball pork chop leberkas rump, rump bacon, jowl"
|
||||||
|
"tip ham. Shankle salami tongue venison short ribs kielbasa"
|
||||||
|
"tri-tip ham hock swine hamburger. Flank meatball corned beef"
|
||||||
|
"cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
|
||||||
|
"beef ribs rump jowl tenderloin swine sausage biltong"
|
||||||
|
"bacon rump tail boudin meatball boudin meatball boudin."
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
form.errors["anything_else"],
|
form.errors["anything_else"],
|
||||||
["Response must be less than 1000 characters."],
|
["Response must be less than 2000 characters."],
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_anything_else_form_character_count_invalid(self):
|
def test_anything_else_form_character_count_invalid(self):
|
||||||
"""Response must be less than 1000 characters."""
|
"""Response must be less than 2000 characters."""
|
||||||
form = AboutYourOrganizationForm(
|
form = AboutYourOrganizationForm(
|
||||||
data={
|
data={
|
||||||
"about_your_organization": "Bacon ipsum dolor amet fatback"
|
"about_your_organization": "Bacon ipsum dolor amet fatback"
|
||||||
|
@ -306,11 +341,29 @@ class TestFormValidation(MockEppLib):
|
||||||
"cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
|
"cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
|
||||||
"beef ribs rump jowl tenderloin swine sausage biltong"
|
"beef ribs rump jowl tenderloin swine sausage biltong"
|
||||||
"bacon rump tail boudin meatball boudin meatball boudin."
|
"bacon rump tail boudin meatball boudin meatball boudin."
|
||||||
|
"strip steak pastrami"
|
||||||
|
"shankle, drumstick doner chicken landjaeger turkey andouille."
|
||||||
|
"Buffalo biltong chuck pork chop tongue bresaola turkey. Doner"
|
||||||
|
"ground round strip steak, jowl tail chuck ribeye bacon"
|
||||||
|
"beef ribs swine filet ball tip pancetta strip steak sirloin"
|
||||||
|
"mignon ham spare ribs rump. Tail shank biltong beef ribs doner"
|
||||||
|
"buffalo swine bacon. Tongue cow picanha brisket bacon chuck"
|
||||||
|
"leberkas pork loin pork, drumstick capicola. Doner short loin"
|
||||||
|
"ground round fatback turducken chislic shoulder turducken"
|
||||||
|
"spare ribs, burgdoggen kielbasa kevin frankfurter ball tip"
|
||||||
|
"pancetta cupim. Turkey meatball andouille porchetta hamburger"
|
||||||
|
"pork chop corned beef. Brisket short ribs turducken, pork chop"
|
||||||
|
"chislic turkey ball pork chop leberkas rump, rump bacon, jowl"
|
||||||
|
"tip ham. Shankle salami tongue venison short ribs kielbasa"
|
||||||
|
"tri-tip ham hock swine hamburger. Flank meatball corned beef"
|
||||||
|
"cow sausage ball tip kielbasa ham hock. Ball tip cupim meatloaf"
|
||||||
|
"beef ribs rump jowl tenderloin swine sausage biltong"
|
||||||
|
"bacon rump tail boudin meatball boudin meatball boudin."
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
form.errors["about_your_organization"],
|
form.errors["about_your_organization"],
|
||||||
["Response must be less than 1000 characters."],
|
["Response must be less than 2000 characters."],
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_your_contact_email_invalid(self):
|
def test_your_contact_email_invalid(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue