mirror of
https://github.com/logos-co/open-law.git
synced 2025-01-24 13:49:26 +00:00
9 lines
249 B
Python
9 lines
249 B
Python
from flask import flash
|
|
|
|
|
|
def create_error_flash(form):
|
|
for field, errors in form.errors.items():
|
|
field_label = form._fields[field].label.text
|
|
for error in errors:
|
|
flash(error.replace("Field", field_label), "danger")
|