{
    "id": "http://schemas.triniti.io/json-schema/gdbots/forms/mixin/field/1-0-1.json#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "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"
            }
        }
    },
    "required": [
        "name"
    ],
    "additionalProperties": true
}