# Mandatory dropdown

**URL:** <https://community.plotly.com/t/mandatory-dropdown/73793>\
**Category:** Dash Python\
**Created:** [March 22, 2023, 6:57pm UTC](https://community.plotly.com/t/mandatory-dropdown/73793 "2023-03-22T18:57:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedromsouza](https://avatars.discourse-cdn.com/v4/letter/p/4bbf92/32.png) [@pedromsouza](https://community.plotly.com/u/pedromsouza)\
**Post date:** [March 22, 2023, 6:57pm UTC](https://community.plotly.com/t/mandatory-dropdown/73793/1 "2023-03-22T18:57:06Z")

</div>

Is it possible to set a dropdown as mandatory?

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [March 22, 2023, 7:01pm UTC](https://community.plotly.com/t/mandatory-dropdown/73793/2 "2023-03-22T19:01:40Z")

</div>

Hello @pedromsouza,

Can you define required? Technically, you could abort the callback if it is empty.

---

<div class="post-metadata">

**Author:** ![pedromsouza](https://avatars.discourse-cdn.com/v4/letter/p/4bbf92/32.png) [@pedromsouza](https://community.plotly.com/u/pedromsouza)\
**Post date:** [March 22, 2023, 7:03pm UTC](https://community.plotly.com/t/mandatory-dropdown/73793/3 "2023-03-22T19:03:32Z")

</div>

I tried setting “clearable = False”, but it didn’t work. How could I abort the callback?

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [March 22, 2023, 7:09pm UTC](https://community.plotly.com/t/mandatory-dropdown/73793/4 "2023-03-22T19:09:23Z")

</div>

Something like this:

```auto
if value is None or value == '':
    return no_update

```

Or with your return, you could output to a modal that tells the user they need to fill in that field.

You could also make it so there is a submit button that isnt enabled until all the proper fields are filled in.
