Rasa form. validate slots provided in message which trigger the form


I just noticed that the validate function doesn’t get called once the form is triggerd, I need to be able to handle the message and manipulate slots once the form is being triggerd. Is their any way I can do this?


Hey @WilliamG,

Just to clarify, are you trying to extract information from the user message as slots before the form is triggered? If so, it sounds like you may want to look at the following:

Basically, the validation gets run when a slot value it requires is extracted. If you trigger a form with the required slot values already populated, it will run the validation on those pre-filled slots.

If you can’t extract the entities directly from the user message through your NLU pipeline, you could create a custom action to process the user message and set the slots, then followup with the form.You would train the model to predict that action instead of the form directly.

1 Like


I’m fully aware of how to extract slot-values. I’m using a duckling to extract dates, however when the user provides a date in the message which initiates the form the extracted date doesnt reach the validate function, which I have made some modifications to

1 Like

Okay, great!

So, it sounds like an issue in the form action itself. I would check the following:

  • The date slot is a required slot in the form
  • The slot name and entity name are the same (If they aren’t, look at the Custom Slot Mapping link in my previous message)
  • Check the documentation on Validating User Input (last link in my previous response)

Hi @WilliamG. Did you figure out/ create an issue to address the problem? What did you find? This may be a duckling thing and may be a useful thing to solve! Could you share your custom validation pipeline?