Skip to main content
Validate event venue component schema

Properties

  • venueType (array of string (min: 1, max: 2))
  • title (string) - maxLength: 50 - Event Title.
  • address (string) - minLength: 5 - maxLength: 1000
  • hasMapLocation (boolean) - default: False - Whether location has to be shown on google map
  • location (object - ref: location)
  • joinButton (object - ref: button)
  • joiningPhoneNumbers (array of object (min: , max: 10)) - Phone number to join events.
  • joiningPassword (string) - maxLength: 400 - Joining password
  • eventNotes (string) - maxLength: 1000 - Event Notes.
  • formatting (object)
    • textStyle (object - style component reference)
    • cardStyle (object - style component reference)
    • iconStyle (object - style component reference)

Used in Categories

This component is used in the following categories:

Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {},
  "title": "Event Venue component",
  "description": "Validate event venue component schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "venueType": {
      "type": "array",
      "minItems": 1,
      "maxItems": 2,
      "items": {
        "type": "string",
        "enum": [
          "physical",
          "online"
        ]
      }
    },
    "title": {
      "type": "string",
      "maxLength": 50,
      "description": "Event Title."
    },
    "address": {
      "type": "string",
      "minLength": 5,
      "maxLength": 1000
    },
    "hasMapLocation": {
      "type": "boolean",
      "default": false,
      "description": "Whether location has to be shown on google map"
    },
    "location": {
      "$ref": "_base_map.json#/properties/location"
    },
    "joinButton": {
      "$ref": "button.json"
    },
    "joiningPhoneNumbers": {
      "type": "array",
      "description": "Phone number to join events.",
      "maxItems": 10,
      "$comment": "Allow up to 10 numbers.",
      "additionalProperties": false,
      "items": {
        "type": "object",
        "required": [
          "phoneNumber"
        ],
        "additionalProperties": false,
        "properties": {
          "phoneNumber": {
            "type": "string",
            "maxLength": 30,
            "pattern": "^(\\d{1,20})$|^((\\+\\d{1,3}([- ])?\\(?\\d\\)?([- ])?\\d{1,5})|(\\(?\\d{2,6}\\)?))([- ])?(\\d{3,4})([- ])?(\\d{4})([- ])?((x|ext|;)([- ])?\\d{1,5})?$"
          },
          "label": {
            "type": "string"
          }
        }
      }
    },
    "joiningPassword": {
      "type": "string",
      "description": "Joining password",
      "maxLength": 400
    },
    "eventNotes": {
      "type": "string",
      "maxLength": 1000,
      "description": "Event Notes."
    },
    "formatting": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "textStyle": {
          "$ref": "style/text.json"
        },
        "cardStyle": {
          "$ref": "style/card.json"
        },
        "iconStyle": {
          "$ref": "style/icon.json"
        }
      }
    }
  },
  "oneOf": [
    {
      "properties": {
        "venueType": {
          "const": [
            "physical"
          ]
        }
      },
      "required": [
        "address"
      ]
    },
    {
      "properties": {
        "venueType": {
          "const": [
            "online"
          ]
        }
      },
      "required": [
        "joinButton"
      ]
    },
    {
      "properties": {
        "venueType": {
          "const": [
            "physical",
            "online"
          ]
        }
      },
      "required": [
        "address",
        "joinButton"
      ]
    },
    {
      "properties": {
        "venueType": {
          "const": [
            "online",
            "physical"
          ]
        }
      },
      "required": [
        "address",
        "joinButton"
      ]
    }
  ]
}