# Deactivate form in the FormValidation method (validate\_slot\_name))

**URL:** <https://forum.rasa.com/t/deactivate-form-in-the-formvalidation-method-validate-slot-name/56821>\
**Category:** Rasa Open Source\
**Created:** [January 10, 2023, 12:48pm UTC](https://forum.rasa.com/t/deactivate-form-in-the-formvalidation-method-validate-slot-name/56821 "2023-01-10T12:48:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heba989](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/heba989/32/22249_2.png) [@Heba989](https://forum.rasa.com/u/Heba989)\
**Post date:** [January 10, 2023, 12:48pm UTC](https://forum.rasa.com/t/deactivate-form-in-the-formvalidation-method-validate-slot-name/56821/1 "2023-01-10T12:48:29Z")

</div>

Hi, I have a FormValidationAction that validates a slot value based on the API request response, in case the API returns None I need to deactivate the form, stop the active loop, and reset all slots. I have tried to return all the following events or suggestions but no one was efficient and the form keeps going for ask next slots since the FormValidation only expects to return slot events: What I tried, as suggested in the rasa community for the same issue:

```
              # self.deactivate()
             # raise ActionExecutionRejection(self.name(), Activeloop(None))
             # return[ActiveLoop(None), AllSlotsReset()]
             #reutrn [(Restarted(), AllSlotsReset()]
             # # raise ActionExecutionRejection(self.name(), deactivate_form=True)
            # # return[SlotSet(REQUESTED_SLOT, None), ActiveLoop(None), AllSlotsReset()]
             # # return[FollowupAction("action_deactivate_loop"), AllSlotsReset()]
             # # return[FollowupAction("action_deactivate_loop")]
             # # return[SlotSet(REQUESTED_SLOT, None)]
             # # return [FollowupAction("action_deactivate_loop"), AllSlotsReset()]
             # # return [ActiveLoop(None), SlotSet(REQUESTED_SLOT, None)]
            # return[FollowupAction("action_deactivate_loop")]
            # return [ActiveLoop(None), SlotSet('requested', None)]

```

Rasa:

Rasa Version : 3.2.10 Minimum Compatible Version: 3.0.0 Rasa SDK Version : 3.2.2 Python Version : 3.8.10 Operating System : Linux-5.15.0-57-generic-x86\_64-with-glibc2.35

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [January 10, 2023, 5:14pm UTC](https://forum.rasa.com/t/deactivate-form-in-the-formvalidation-method-validate-slot-name/56821/2 "2023-01-10T17:14:04Z")

</div>

[Here’s](https://github.com/RasaHQ/helpdesk-assistant/blob/2e9f2258c6648488bd02af86ea2803de5a9fde04/actions/actions.py#L115) a working example in the helpdesk-assistant.

---

<div class="post-metadata">

**Author:** ![Heba989](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/heba989/32/22249_2.png) [@Heba989](https://forum.rasa.com/u/Heba989)\
**Post date:** [January 11, 2023, 5:53am UTC](https://forum.rasa.com/t/deactivate-form-in-the-formvalidation-method-validate-slot-name/56821/3 "2023-01-11T05:53:15Z")

</div>

Tanks, but Returning AllSlotsReset() doesn’t work and formvalidation keeps going with ‘action\_listen’ and ask for next slot
