{
    "id": "http://schemas.gdbots.io/json-schema/gdbots/forms/mixin/field/1-0-2.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."
        },
        "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\")."
        },
        "label": {
            "type": "string",
            "minLength": 0,
            "maxLength": 255,
            "description": "The main text for the question/field."
        },
        "placeholder": {
            "type": "string",
            "minLength": 0,
            "maxLength": 255
        },
        "description": {
            "type": "string",
            "minLength": 0,
            "maxLength": 65535,
            "description": "A short description to better explain this field."
        },
        "is_required": {
            "type": "boolean"
        },
        "link_text": {
            "type": "string",
            "minLength": 0,
            "maxLength": 255,
            "description": "The text that will replace the token \"{link}\" within the label or description."
        },
        "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."
        },
        "pii_impact": {
            "type": "string",
            "enum": [
                "unknown",
                "high",
                "moderate",
                "low"
            ]
        }
    },
    "required": [
        "name"
    ],
    "additionalProperties": true
}