Improve task order upload validation handling.

- Display validation errors.
- Rerender validated form data correctly.
- Clear error state correctly.
This commit is contained in:
dandds
2019-06-06 13:40:50 -04:00
parent 318257e32c
commit 159360692f
6 changed files with 48 additions and 14 deletions

View File

@@ -18,7 +18,7 @@ class TaskOrderForm(BaseForm):
None,
validators=[
FileAllowed(["pdf"], translate("forms.task_order.file_format_not_allowed")),
FileLength(),
FileLength(message=translate("forms.validators.file_length")),
],
render_kw={"accept": ".pdf,application/pdf"},
)