mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-03 01:33:32 +02:00
Hook up enum
This commit is contained in:
parent
5b2eeee547
commit
91ed4a598c
3 changed files with 10 additions and 16 deletions
|
@ -13,6 +13,7 @@ from api.views import DOMAIN_API_MESSAGES
|
|||
from registrar.models import Contact, DomainApplication, DraftDomain, Domain
|
||||
from registrar.templatetags.url_helpers import public_site_url
|
||||
from registrar.utility import errors
|
||||
from registrar.utility.enums import ValidationErrorReturnType
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -385,7 +386,7 @@ class AlternativeDomainForm(RegistrarForm):
|
|||
def clean_alternative_domain(self):
|
||||
"""Validation code for domain names."""
|
||||
requested = self.cleaned_data.get("alternative_domain", None)
|
||||
validated = DraftDomain.validate_and_handle_errors(requested, "FORM_VALIDATION_ERROR")
|
||||
validated = DraftDomain.validate_and_handle_errors(requested, ValidationErrorReturnType.FORM_VALIDATION_ERROR)
|
||||
return validated
|
||||
|
||||
alternative_domain = forms.CharField(
|
||||
|
@ -461,7 +462,7 @@ class DotGovDomainForm(RegistrarForm):
|
|||
def clean_requested_domain(self):
|
||||
"""Validation code for domain names."""
|
||||
requested = self.cleaned_data.get("requested_domain", None)
|
||||
validated = DraftDomain.validate_and_handle_errors(requested, "FORM_VALIDATION_ERROR")
|
||||
validated = DraftDomain.validate_and_handle_errors(requested, ValidationErrorReturnType.FORM_VALIDATION_ERROR)
|
||||
return validated
|
||||
|
||||
requested_domain = forms.CharField(label="What .gov domain do you want?")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue