rasa_sdk/forms.py
async def validate_slots(
        self,
        slot_dict: Dict[Text, Any],
        dispatcher: "CollectingDispatcher",
        tracker: "Tracker",
        domain: "DomainDict",
    ) -> List[EventType]:
        """Validate slots using helper validation functions.

        Call validate_{slot} function for each slot, value pair to be validated.
        If this function is not implemented, set the slot to the value.
        """

        for slot, value in list(slot_dict.items()):
            validate_func = getattr(self, f"validate_{slot}", lambda *x: {slot: value})
            if utils.is_coroutine_action(validate_func):
                validation_output = await validate_func(
                    value, dispatcher, tracker, domain
                )
            else:
                validation_output = validate_func(value, dispatcher, tracker, domain)
            if not isinstance(validation_output, dict):
                warnings.warn(
                    "Returning values in helper validation methods is deprecated. "
                    + f"Your `validate_{slot}()` method should return "
                    + "a dict of {'slot_name': value} instead."
                )
                validation_output = {slot: validation_output}
            slot_dict.update(validation_output)

        # validation succeed, set slots to extracted values
        return [SlotSet(slot, value) for slot, value in slot_dict.items()]
Validate slots using helper validation functions.

        Call validate_{slot} function for each slot, value pair to be validated.
        If this function is not implemented, set the slot to the value.
        
Validate slots using helper validation functions.
Call validate_{slot} function for each slot, value pair to be validated.
If this function is not implemented, set the slot to the value.
Validate slots using helper validation functions . Call validate_ { slot } function for each slot value pair to be validated . If this function is not implemented set the slot to the value .
async def validate_slots(
        self,
        slot_dict: Dict[Text, Any],
        dispatcher: "CollectingDispatcher",
        tracker: "Tracker",
        domain: "DomainDict",
    ) -> List[EventType]:
        for slot, value in list(slot_dict.items()):
            validate_func = getattr(self, f"validate_{slot}", lambda *x: {slot: value})
            if utils.is_coroutine_action(validate_func):
                validation_output = await validate_func(
                    value, dispatcher, tracker, domain
                )
            else:
                validation_output = validate_func(value, dispatcher, tracker, domain)
            if not isinstance(validation_output, dict):
                warnings.warn(
                    "Returning values in helper validation methods is deprecated. "
                    + f"Your `validate_{slot}()` method should return "
                    + "a dict of {'slot_name': value} instead."
                )
                validation_output = {slot: validation_output}
            slot_dict.update(validation_output)
        return [SlotSet(slot, value) for slot, value in slot_dict.items()]
async def validate_slots ( self , slot_dict : Dict [ Text , Any ] , dispatcher : "CollectingDispatcher" , tracker : "Tracker" , domain : "DomainDict" , ) -> List [ EventType ] : for slot , value in list ( slot_dict . items ( ) ) : validate_func = getattr ( self , f"validate_{slot}" , lambda * x : { slot : value } ) if utils . is_coroutine_action ( validate_func ) : validation_output = await validate_func ( value , dispatcher , tracker , domain ) else : validation_output = validate_func ( value , dispatcher , tracker , domain ) if not isinstance ( validation_output , dict ) : warnings . warn ( "Returning values in helper validation methods is deprecated. " + f"Your `validate_{slot}()` method should return " + "a dict of {'slot_name': value} instead." ) validation_output = { slot : validation_output } slot_dict . update ( validation_output ) return [ SlotSet ( slot , value ) for slot , value in slot_dict . items ( ) ]
Validate slots using helper validation functions.
Validate slots using helper validation functions .
"""Validate slots using helper validation functions.

        Call validate_{slot} function for each slot, value pair to be validated.
        If this function is not implemented, set the slot to the value.
        """ # validation succeed, set slots to extracted values
self
slot_dict
Dict[Text, Any]
dispatcher
"CollectingDispatcher"
tracker
"Tracker"
domain
"DomainDict"