rasa_sdk/forms.py
async def validate(
        self,
        dispatcher: "CollectingDispatcher",
        tracker: "Tracker",
        domain: "DomainDict",
    ) -> List[EventType]:
        """Extract and validate value of requested slot.

        If nothing was extracted reject execution of the form action.
        Subclass this method to add custom validation and rejection logic
        """

        # extract other slots that were not requested
        # but set by corresponding entity or trigger intent mapping
        slot_values = self.extract_other_slots(dispatcher, tracker, domain)

        # extract requested slot
        slot_to_fill = tracker.get_slot(REQUESTED_SLOT)
        if slot_to_fill:
            slot_values.update(
                self.extract_requested_slot(dispatcher, tracker, slot_to_fill, domain)
            )

            if not slot_values:
                # reject to execute the form action
                # if some slot was requested but nothing was extracted
                # it will allow other policies to predict another action
                raise ActionExecutionRejection(
                    self.name(),
                    f"Failed to extract slot {slot_to_fill} with action {self.name()}."
                    f"Allowing other policies to predict next action.",
                )
        logger.debug(f"Validating extracted slots: {slot_values}")
        return await self.validate_slots(slot_values, dispatcher, tracker, domain)
Extract and validate value of requested slot.

        If nothing was extracted reject execution of the form action.
        Subclass this method to add custom validation and rejection logic
        
Extract and validate value of requested slot.
If nothing was extracted reject execution of the form action.
Subclass this method to add custom validation and rejection logic
Extract and validate value of requested slot . If nothing was extracted reject execution of the form action . Subclass this method to add custom validation and rejection logic
async def validate(
        self,
        dispatcher: "CollectingDispatcher",
        tracker: "Tracker",
        domain: "DomainDict",
    ) -> List[EventType]:
        slot_values = self.extract_other_slots(dispatcher, tracker, domain)
        slot_to_fill = tracker.get_slot(REQUESTED_SLOT)
        if slot_to_fill:
            slot_values.update(
                self.extract_requested_slot(dispatcher, tracker, slot_to_fill, domain)
            )
            if not slot_values:
                raise ActionExecutionRejection(
                    self.name(),
                    f"Failed to extract slot {slot_to_fill} with action {self.name()}."
                    f"Allowing other policies to predict next action.",
                )
        logger.debug(f"Validating extracted slots: {slot_values}")
        return await self.validate_slots(slot_values, dispatcher, tracker, domain)
async def validate ( self , dispatcher : "CollectingDispatcher" , tracker : "Tracker" , domain : "DomainDict" , ) -> List [ EventType ] : slot_values = self . extract_other_slots ( dispatcher , tracker , domain ) slot_to_fill = tracker . get_slot ( REQUESTED_SLOT ) if slot_to_fill : slot_values . update ( self . extract_requested_slot ( dispatcher , tracker , slot_to_fill , domain ) ) if not slot_values : raise ActionExecutionRejection ( self . name ( ) , f"Failed to extract slot {slot_to_fill} with action {self.name()}." f"Allowing other policies to predict next action." , ) logger . debug ( f"Validating extracted slots: {slot_values}" ) return await self . validate_slots ( slot_values , dispatcher , tracker , domain )
Extract and validate value of requested slot.
Extract and validate value of requested slot .
"""Extract and validate value of requested slot.

        If nothing was extracted reject execution of the form action.
        Subclass this method to add custom validation and rejection logic
        """ # extract other slots that were not requested # but set by corresponding entity or trigger intent mapping # extract requested slot # reject to execute the form action # if some slot was requested but nothing was extracted # it will allow other policies to predict another action
self
dispatcher
"CollectingDispatcher"
tracker
"Tracker"
domain
"DomainDict"