# Required: true not enforced for upload field in form templates

**URL:** https://meta.discourse.org/t/required-true-not-enforced-for-upload-field-in-form-templates/398972
**Category:** Bug
**Tags:** form-templates, fixed
**Created:** [March 21, 2026, 5:32pm UTC](https://meta.discourse.org/t/required-true-not-enforced-for-upload-field-in-form-templates/398972 "2026-03-21T17:32:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Muzzydex](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Muzzydex](https://meta.discourse.org/u/Muzzydex)
#### Post date: [March 21, 2026, 5:32pm UTC](https://meta.discourse.org/t/required-true-not-enforced-for-upload-field-in-form-templates/398972/1 "2026-03-21T17:32:47Z")

</div>

Hello! I’m using Discourse form templates for topic creation, and validation is working correctly for all field types _except_ `upload`.

Despite setting `validations: required: true` on an `upload` field, users are still able to submit the form without attaching any files.

My understanding is that when an `upload` field has:

```plaintext
validations:
  required: true

```

…the form should prevent submission unless at least one file is uploaded. The form renders correctly. Other fields (input, textarea, tag-chooser, URL validation) enforce `required` as expected, but the `upload` field does **not** block submission when empty.

YAML is valid and the template loads without errors. File uploads themselves work correctly when used , so the issue appears to be specific to enforcement of `required` on the `upload` field. My YAML string for this uploads in my template looks like this:

`- type: upload`  
`id: patch-uploaded`  
`attributes:`  
`file_types: “.jpg, .png, .gif, .zip”`  
`allow_multiple: true`  
`label: “Upload your .zip”`  
`validations:`  
`required: true`

Thanks in advance for any help!

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [March 23, 2026, 6:23pm UTC](https://meta.discourse.org/t/required-true-not-enforced-for-upload-field-in-form-templates/398972/2 "2026-03-23T18:23:27Z")

</div>

Nice catch 👍 It should be fixed by

[https://github.com/discourse/discourse/pull/38799](https://github.com/discourse/discourse/pull/38799)

---

<div class="post-metadata">

### Author: ![Muzzydex](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Muzzydex](https://meta.discourse.org/u/Muzzydex)
#### Post date: [March 23, 2026, 9:28pm UTC](https://meta.discourse.org/t/required-true-not-enforced-for-upload-field-in-form-templates/398972/3 "2026-03-23T21:28:40Z")

</div>

Many thanks, @zogstrip!

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [March 25, 2026, 1:50pm UTC](https://meta.discourse.org/t/required-true-not-enforced-for-upload-field-in-form-templates/398972/4 "2026-03-25T13:50:46Z")

</div>


