This commit is contained in:
zandercymatics 2024-01-09 14:22:50 -07:00
parent 05ebe98adb
commit 45e994ea05
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 4 additions and 3 deletions

View file

@ -461,7 +461,9 @@ class DotGovDomainForm(RegistrarForm):
def clean_requested_domain(self): def clean_requested_domain(self):
"""Validation code for domain names.""" """Validation code for domain names."""
requested = self.cleaned_data.get("requested_domain", None) requested = self.cleaned_data.get("requested_domain", None)
validated, _ = DraftDomain.validate_and_handle_errors(requested, ValidationErrorReturnType.FORM_VALIDATION_ERROR) validated, _ = DraftDomain.validate_and_handle_errors(
requested, ValidationErrorReturnType.FORM_VALIDATION_ERROR
)
return validated return validated
requested_domain = forms.CharField(label="What .gov domain do you want?") requested_domain = forms.CharField(label="What .gov domain do you want?")

View file

@ -1,4 +1,3 @@
from enum import Enum
import re import re
from django import forms from django import forms