I have a custom validator in a Flask-WTF form
that looks like this:
def is_some_condition_true(arg: str) -> bool:
return arg == "example"
def validation_func(self, arg: str) -> None:
if not is_some_condition_true(arg):
raise ValidationError("The <strong>validation</strong> failed")
As you can see, I'm trying to insert html in the error message. Unfortunately, the result looks like this:
How can I put html in the validation error message without it being escaped?