# Required file input

**URL:** <https://community.transloadit.com/t/required-file-input/15286>\
**Category:** Uppy\
**Created:** [May 19, 2020, 3:23pm UTC](https://community.transloadit.com/t/required-file-input/15286 "2020-05-19T15:23:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![heng](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/heng/32/231_2.png) [@heng](https://community.transloadit.com/u/heng)\
**Post date:** [May 19, 2020, 3:23pm UTC](https://community.transloadit.com/t/required-file-input/15286/1 "2020-05-19T15:23:48Z")

</div>

Does Uppy support `required: true` option? I would like to display a warning message if a user submits for without uploading any file.

---

<div class="post-metadata">

**Author:** ![ajkachnic](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/ajkachnic/32/260_2.png) [@ajkachnic](https://community.transloadit.com/u/ajkachnic)\
**Post date:** [July 8, 2020, 12:04am UTC](https://community.transloadit.com/t/required-file-input/15286/2 "2020-07-08T00:04:22Z")

</div>

To my knowledge, there is not an explict `required` option, but there is a way to achieve the same effect using the `restrictions` option

Here is a brief code snippet

```javascript
const uppy = Uppy({
 restrictions: {
    minNumberOfFiles: 1,
  },
 // The rest of the uppy config
})

```

If you would like to look further into this, [here is the link from the docs](https://uppy.io/docs/uppy/#restrictions)

This should work, but let me know how it goes for you.

- Andrew
