How to close a dynamic form properly using a custom form validation?

We provided form with from_intent slot mapping in domain file.

forms:
  form_question:
    required_slots:
        answer1:
        - type: from_intent
          value: yes
          intent: yes
          no_intent: [no, greet]
        answer2:
        - type: from_intent
          value: yes
          intent: yes
          no_intent: [no, greet]
        answer3:
        - type: from_intent
          value: yes
          intent: yes
          no_intent: [no, greet]
        answer4:
        - type: from_intent
          value: yes
          intent: yes
          no_intent: [no, greet]
        answer5:
        - type: from_intent
          value: yes
          intent: yes
          no_intent: [no, greet]

We use our own dynamic form validation (actionserver) written in Java.

We need the dynamic form to close immediately after receiving any of the possible intents that do not satisfy the condition. Now we see that if we send in response to an inappropriate intent this:

{"events": [{"name": "requested_slot", "value": null, "event": "slot", "timestamp": null}], "responses": []},

the rule for the received intent will be executed and then the request will be sent again using the dynamic form. As a result, the check for intent will fail and the response will be sent again with an empty requested_slot.

How to correctly complete a dynamic form without using a bad path in stories and rules?

@annthehuman you need to check the form activation/deactivation Forms

@annthehuman For understanding the concept, I know you know already but please even see this tutorial for ref : https://youtu.be/U3an88fjFRc only concept of deactivation.