class_docstr: Example of a form validation action.
docstr: Validate outdoor_seating value.
code: def validate_outdoor_seating(
      self,
      value: Text,
      dispatcher: CollectingDispatcher,
      tracker: Tracker,
      domain: Dict[Text, Any],
  ) -> Dict[Text, Any]:
      """Validate outdoor_seating value."""
  
      if isinstance(value, str):
          if "out" in value:
              # convert "out..." to True
              return {"outdoor_seating": True}
          elif "in" in value:
              # convert "in..." to False
              return {"outdoor_seating": False}
          else:
              dispatcher.utter_message(
                  response="utter_wrong_outdoor_seating"
              )
              # validation failed, set slot to None
              return {"outdoor_seating": None}
  
      else:
          # affirm/deny was picked up as True/False by the from_intent mapping
          return {"outdoor_seating": value}
  
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 6 for calling the ValidateRestaurantForm obj's underlying member method code with example usage: obj.validate_outdoor_seating(value, dispatcher, tracker, domain) and returns: dict, dict, dict, dict