Custom _validate_if_required in form action not working

I’m using form like this


  • dat_ban
    • action_fill_slot_intent_dat_ban
    • form_intent_dat_ban
    • form{“name”: “form_intent_dat_ban”}
    • form{“name”: null}
    • utter_response_text_5d245e3e3777161d163ed606un89lmkp

then form not validate . therefore i overrided function _validate_if_required of formAction like bellow

def _validate_if_required(self, dispatcher, tracker, domain):
    if tracker.active_form.get( "validate", True):
        return self.validate(dispatcher, tracker, domain)
        return []

but form still not validate.

Please help me

Hi @dungpv, you shouldn’t override that function. Rather you should write a validate_{slot} method (replacing {slot} with the slot name) for each slot that you want to validate.