Add custom message for object_name length validation
This commit is contained in:
parent
ac7de6b4d2
commit
6652d47104
@ -71,7 +71,12 @@ class AttachmentForm(BaseForm):
|
|||||||
Length(max=100, message="Filename may be no longer than 100 characters.")
|
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"
|
accept = ".pdf,application/pdf"
|
||||||
|
|
||||||
def validate(self, *args, **kwargs):
|
def validate(self, *args, **kwargs):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user