Focusing validation on individual form with one input

This commit is contained in:
Jonathan Bobel
2025-03-03 13:33:45 -05:00
parent f4ca597964
commit 94f881477e
7 changed files with 8 additions and 8 deletions

View File

@@ -167,7 +167,7 @@ def send_messages(service_id, template_id):
# just show the first error, as we don't expect the form to have more
# than one, since it only has one field
first_field_errors = list(form.errors.values())[0]
error_message = '<span class="usa-error-message">'
error_message = '<span class="error message usa-error-message">'
error_message = f"{error_message}{first_field_errors[0]}"
error_message = f"{error_message}</span>"
error_message = Markup(error_message)