Form is invalid if no file is uploaded
This commit is contained in:
parent
be080ed205
commit
cb2569c504
@ -218,5 +218,8 @@ class ExtendedFinancialForm(BaseFinancialForm):
|
||||
|
||||
task_order = FileField(
|
||||
"Upload a copy of your Task Order",
|
||||
validators=[FileAllowed(["pdf"], "Only PDF documents can be uploaded.")],
|
||||
validators=[
|
||||
FileAllowed(["pdf"], "Only PDF documents can be uploaded."),
|
||||
Required(),
|
||||
],
|
||||
)
|
||||
|
@ -95,8 +95,13 @@
|
||||
validation='integer'
|
||||
) }}
|
||||
|
||||
<div class="usa-input usa-input--validation--anything {% if f.task_order.errors %} usa-input--error {% endif %}">
|
||||
{{ f.task_order.label }}
|
||||
{{ f.task_order }}
|
||||
{% for error in f.task_order.errors %}
|
||||
<span class="usa-input__message">{{error}}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user