# Restrict Slot values

**URL:** <https://forum.rasa.com/t/restrict-slot-values/3894>\
**Category:** Rasa Open Source\
**Created:** [December 27, 2018, 10:50am UTC](https://forum.rasa.com/t/restrict-slot-values/3894 "2018-12-27T10:50:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SNV](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@SNV](https://forum.rasa.com/u/SNV)\
**Post date:** [December 27, 2018, 10:50am UTC](https://forum.rasa.com/t/restrict-slot-values/3894/1 "2018-12-27T10:50:20Z")

</div>

Hi all,

I need to restrict the slot values to 4 digit numbers alone. Is there any way to do so from the domain.yml file

I tried with Slot type as float. Slots: repo\_id : type : float min value: 1000.0 max\_value:10000.0 it works.

but wish to know any other way for doing the same

---

<div class="post-metadata">

**Author:** ![rroa](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/rroa/32/977_2.png) [@rroa](https://forum.rasa.com/u/rroa)\
**Post date:** [December 27, 2018, 2:40pm UTC](https://forum.rasa.com/t/restrict-slot-values/3894/2 "2018-12-27T14:40:03Z")

</div>

You can try using regex. [Here’s the official documentation](https://rasa.com/docs/nlu/master/entities/#regular-expressions-regex).

---

<div class="post-metadata">

**Author:** ![SNV](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@SNV](https://forum.rasa.com/u/SNV)\
**Post date:** [December 29, 2018, 11:33am UTC](https://forum.rasa.com/t/restrict-slot-values/3894/3 "2018-12-29T11:33:08Z")

</div>

Thanks a lot. That helps
