Fix issues from merge

This commit is contained in:
Neil Martinsen-Burrell 2023-01-09 14:03:00 -06:00
parent 8d3991614e
commit dc7c782050
No known key found for this signature in database
GPG key ID: 6A3C818CC10D0184
5 changed files with 45 additions and 32 deletions

View file

@ -446,3 +446,14 @@ class RequirementsForm(RegistrarForm):
),
required=False, # use field validation to enforce this
)
def clean_is_policy_acknowledged(self):
"""This box must be checked to proceed but offer a clear error."""
# already converted to a boolean
is_acknowledged = self.cleaned_data["is_policy_acknowledged"]
if not is_acknowledged:
raise forms.ValidationError(
"You must read and agree to the .gov domain requirements to proceed.",
code="invalid",
)
return is_acknowledged