From 6652d47104b840428e65c660ebb5094e58a57e4c Mon Sep 17 00:00:00 2001 From: richard-dds Date: Tue, 13 Aug 2019 13:58:36 -0400 Subject: [PATCH] Add custom message for object_name length validation --- atst/forms/task_order.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/atst/forms/task_order.py b/atst/forms/task_order.py index 7c1aa84b..db5c42e8 100644 --- a/atst/forms/task_order.py +++ b/atst/forms/task_order.py @@ -71,7 +71,12 @@ class AttachmentForm(BaseForm): Length(max=100, message="Filename may be no longer than 100 characters.") ], ) - object_name = HiddenField(id="attachment_object_name", validators=[Length(max=40)]) + object_name = HiddenField( + id="attachment_object_name", + validators=[ + Length(max=40, message="Object name may be no longer than 40 characters.") + ], + ) accept = ".pdf,application/pdf" def validate(self, *args, **kwargs):