{
    "id": "http://schemas.triniti.io/json-schema/gdbots/forms/field/yes-no-field/1-0-1.json#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "_schema": {
            "type": "string",
            "pattern": "^pbj:([a-z0-9-]+):([a-z0-9\\.-]+):([a-z0-9-]+)?:([a-z0-9-]+):([0-9]+-[0-9]+-[0-9]+)$",
            "default": "pbj:gdbots:forms:field:yes-no-field:1-0-1"
        },
        "name": {
            "type": "string",
            "pattern": "^[a-zA-Z_]{1}[\\w-]*$",
            "description": "A unique identifier (within the form) for the field. This value is not shown to the user and should NOT change once set.",
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "maps_to": {
            "type": "string",
            "default": "cf",
            "pattern": "^[a-zA-Z_]{1}\\w*$",
            "description": "The name of the schema field the answer will map to. By default this will go to the \"cf\" field which is a \"dynamic-field\" list containing all answers filled out on the form (ref \"gdbots:forms:mixin:send-submission\").",
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "label": {
            "type": "string",
            "minLength": 0,
            "maxLength": 255,
            "description": "The main text for the question/field.",
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "placeholder": {
            "type": "string",
            "minLength": 0,
            "maxLength": 255,
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "description": {
            "type": "string",
            "minLength": 0,
            "maxLength": 65535,
            "description": "A short description to better explain this field.",
            "pbj": {
                "type": "text",
                "rule": "single"
            }
        },
        "is_required": {
            "type": "boolean",
            "pbj": {
                "type": "boolean",
                "rule": "single"
            }
        },
        "link_text": {
            "type": "string",
            "minLength": 0,
            "maxLength": 255,
            "description": "The text that will replace the token \"{link}\" within the label or description.",
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "link_url": {
            "type": "string",
            "pattern": "^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$",
            "description": "The URL to use for the replaced token \"{link}\" within the label or description.",
            "pbj": {
                "type": "string",
                "rule": "single",
                "format": "url"
            }
        },
        "pii_impact": {
            "type": "string",
            "enum": [
                "unknown",
                "high",
                "moderate",
                "low"
            ],
            "pbj": {
                "type": "string-enum",
                "rule": "single"
            }
        },
        "yes_label": {
            "type": "string",
            "minLength": 0,
            "maxLength": 255,
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "no_label": {
            "type": "string",
            "minLength": 0,
            "maxLength": 255,
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "is_consent": {
            "type": "boolean",
            "description": "If this field relates to acquiring a user's consent, e.g. subscribing to a newsletter, then this field can be used to ensure that consent is tracked.",
            "pbj": {
                "type": "boolean",
                "rule": "single"
            }
        }
    },
    "required": [
        "_schema",
        "name"
    ],
    "additionalProperties": false
}