Okay so, i have to validate every slot individually . is there any method to validate them together. I see a code in rasa livecoding on youtube in which @rctatman did something like this:
class ValidateBuyHomeForm(FormValidationAction):
def name(self) -> Text: return "validate_buy_form" def create_validation_function(name_of_slot): def validate_slot( self, slot_value: Text, diapatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any], ) -> Dict[Text, Any]: if slot_value in name_of_slot: return {name_of_slot: slot_value} return (validate_slot) validate_pre_city=create_validation_function(name_of_slot = "pre_city") validate_cost=create_validation_function(name_of_slot = "cost") validate_property_type=create_validation_function(name_of_slot = "property_type") validate_bedrooms=create_validation_function(name_of_slot = "bedrooms") validate_bathrooms=create_validation_function(name_of_slot = "bathrooms") validate_months=create_validation_function(name_of_slot = "months") validate_phone_number=create_validation_function(name_of_slot = "phone_number") validate_email=create_validation_function(name_of_slot = "email")
but it throws the error that create_validation_function must have self as first argument and when i try to add self in it it again throwns error in validating slots that self must have some value while calling the function. Is it the right way to validating the slots then what thing i am missing in it. Or there is only one way i.e validate each slot individually in every form class. ![]()