class_docstr: Example of a form validation action.
docstr: Validate cuisine value.
code: def validate_cuisine(
      self,
      value: Text,
      dispatcher: CollectingDispatcher,
      tracker: Tracker,
      domain: Dict[Text, Any],
  ) -> Dict[Text, Any]:
      """Validate cuisine value."""
  
      if value.lower() in self.cuisine_db():
          # validation succeeded, set the value of the "cuisine" slot to value
          return {"cuisine": value}
      else:
          dispatcher.utter_message(response="utter_wrong_cuisine")
          # validation failed, set this slot to None, meaning the
          # user will be asked for the slot again
          return {"cuisine": None}
  
file_path: rasa/examples/formbot/actions/actions.py
imports: from typing import Dict, Text, Any, List, Union
  from rasa_sdk import Tracker
  from rasa_sdk.executor import CollectingDispatcher
  from rasa_sdk.forms import FormValidationAction
label_desc: Use image node_id 4 for calling the ValidateRestaurantForm obj's underlying member method code with example usage: obj.validate_cuisine(value, dispatcher, tracker, domain) and returns: dict, dict