How to restrict slot filling

it didn’t work for me

Action:

class ValidateHotelBookingForm(FormValidationAction):
    def name(self) -> Text:
        return "validate_hotel_booking_form"

    async def required_slots(
            self,
            slots_mapped_in_domain: List[Text],
            dispatcher: "CollectingDispatcher",
            tracker: "Tracker",
            domain: "DomainDict",
    ) -> Optional[List[Text]]:
        required_slots = slots_mapped_in_domain + ["hotelname"]
        return required_slots

    async def extract_hotelname(
            self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict
    ) -> Dict[Text, Any]:
        name = tracker.get_latest_entity_values("hotel_name")
        return {"hotelname": name}

Since i extended FormValidationAction class i am getting this error Skipping validation for hotelname: there is no validation method specified. Earlier entity and slot was having name now, the entity is hotel_name and slot is hotelname

This is how I coded custom slot mapping, is this the right way to do it?

I am facing one other problem. I have a Synonym mapper that maps [“Michael”, “Hotel Michael”, “Hotel Michael, New York”, “Hotel Michael NYC”] into “Hotel Michael”, So if someone enters their name “Michael” it is transformed into “Hotel Michael” and stored in the PERSON slot.