mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-19 20:52:32 -04:00
Allow html in error messages for text input fields
This commit is contained in:
@@ -194,7 +194,8 @@ def govuk_field_widget(self, field, type=None, param_extensions=None, **kwargs):
|
||||
# error messages
|
||||
error_message = None
|
||||
if field.errors:
|
||||
error_message = {"text": " ".join(field.errors).strip()}
|
||||
error_message_format = "html" if kwargs.get("error_message_with_html") else "text"
|
||||
error_message = {error_message_format: " ".join(field.errors).strip()}
|
||||
|
||||
# convert to parameters that govuk understands
|
||||
params = {
|
||||
|
||||
Reference in New Issue
Block a user