Validating prefilled slots and required slots

Hi,

I am trying to validate slots in Form Action, I notice that the validate slots is getting called twice. → first time - from the validate- prefilled slots and again from validate extracted slots. Incase user enters invalid value: If I give a user message-> i.e. bot utterance as a message to the user-> it is shown twice to the user. and then the message to fill the required slot is shown.

Is it possible for the user to correct the input, if the validation fails the first time itself?

I am using the rasa 1.x version

Hi @Achamma-Chandy, in your validation function you can reject the user input if validation fails the first time and, by default, the Form will prompt the user for the first unfilled slot.

Thank you, I am returning a dictionary where the slot value is set to null, if the custom validation fails I could not understand how to check if this is done for the first time. could you explain?

Also how does it distinguish whether it was a prefilled slot or extracted slot?

Hi, I was able to solve the issue by setting a counter in the validate_ function if value was incorrect. If this counter was set, the user input was rejected i.e. return none for the slot . The counter value was reset in custom request_next_slot function.

If there is any better solution(without using later versions of RASA please let me know.)