Version: 2.5 I am doing a custom validation to slots with regex in actions.py and the definition of slots and validation in actions.py 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.