Stop slot/form validation if user hits with different intent is not working if the validation is with regex

Version: 2.5 I am doing a custom validation to slots with regex in and the definition of slots and validation in is as follows

The regex will check the slot value (name) and sets the value of input to name slot if matched, else it will throw an error saying and slot wont be set until the input is matched with regex.

The following is the definition of action name in domain.yml




and the stories path for name slot

Though I have mentioned in stories, while filling the slot if user does not want to provide the value (with intent deny), the form is not deactivating instead it is checking the user input with regex and throwing the else condition. I have more slots which are validating based on regex each of them are executing the same.

@bharath-madduri You mention required_slots, slot_mapping and requested_slot, but not mentioned in form. Do cross check again the syntax Forms , Forms or

@bharath-madduri Check and your form and slots in domain and do check the rasa doc.You will get.

The link you are referring is 2.7 version, but I am using 2.5 version, as per 2.5 version I assume I have mentioned everything as in docx.

@bharath-madduri Then update the version , as Rasa backend team update so much. Or if you believe your code is 100% delete older train model and re-train.

Tried deleting the model and initiated a new project still no luck with 2.5, will give it a try with 2.7 and let you know if that works, thank you for your help.

I tried in rasa 2.7 , its not working, may be it does not work if slot validation is with regex.

@bharath-madduri check your regex is it correct or not? @bharath-madduri I will encourage to see this example first and implement and then replace with regex. If am sure you have syntax error in code.