mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-03 21:21:14 -04:00
Introduce validation and error handling for validation preview
This commit is contained in:
@@ -769,7 +769,10 @@ class ServiceUpdateEmailBranding(StripWhitespaceForm):
|
||||
class PDFUploadForm(StripWhitespaceForm):
|
||||
file = FileField_wtf(
|
||||
'Upload a letter in PDF format to check if it fits in the printable area',
|
||||
validators=[FileAllowed(['pdf'], 'PDF documents only!')]
|
||||
validators=[
|
||||
FileAllowed(['pdf'], 'PDF documents only!'),
|
||||
DataRequired(message="You need to upload a file to submit")
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user