{
  "schemaVersion": 1,
  "generatedBy": "generation/forms_p7.py",
  "note": "SAMPLE reference data. Values are fictional and no service validates against this file.",
  "attributes": [
    {
      "attribute": "required",
      "appliesTo": [
        "text",
        "email",
        "tel",
        "url",
        "password",
        "search",
        "number",
        "date",
        "time",
        "file",
        "checkbox",
        "radio",
        "select",
        "textarea"
      ],
      "valid": [
        "a non-empty value",
        "any checked radio in the group"
      ],
      "invalid": [
        "an empty string",
        "whitespace only in most browsers"
      ],
      "notes": "On a radio group the flag applies to the group, not to a single control."
    },
    {
      "attribute": "pattern",
      "appliesTo": [
        "text",
        "search",
        "url",
        "tel",
        "email",
        "password"
      ],
      "valid": [
        "[0-9]{6}",
        "NX-[0-9]{4}-[A-Z]{2}"
      ],
      "invalid": [
        "/[0-9]{6}/ with delimiters",
        "an unanchored fragment relied on as anchored"
      ],
      "notes": "The expression is implicitly anchored at both ends and is ignored on an empty value."
    },
    {
      "attribute": "minlength",
      "appliesTo": [
        "text",
        "search",
        "url",
        "tel",
        "email",
        "password",
        "textarea"
      ],
      "valid": [
        2,
        12
      ],
      "invalid": [
        -1,
        "a value larger than maxlength"
      ],
      "notes": "Only enforced once a user has edited the control, never on the initial value."
    },
    {
      "attribute": "maxlength",
      "appliesTo": [
        "text",
        "search",
        "url",
        "tel",
        "email",
        "password",
        "textarea"
      ],
      "valid": [
        40,
        280
      ],
      "invalid": [
        0,
        "a value smaller than minlength"
      ],
      "notes": "Enforced by preventing further typing rather than by reporting an error."
    },
    {
      "attribute": "min",
      "appliesTo": [
        "number",
        "range",
        "date",
        "month",
        "week",
        "time",
        "datetime-local"
      ],
      "valid": [
        0,
        "2026-01-01",
        "08:00"
      ],
      "invalid": [
        "a value above max",
        "a malformed date"
      ],
      "notes": "The type decides how the value is parsed, so 08:00 is legal on time and not on number."
    },
    {
      "attribute": "max",
      "appliesTo": [
        "number",
        "range",
        "date",
        "month",
        "week",
        "time",
        "datetime-local"
      ],
      "valid": [
        100,
        "2026-12-31"
      ],
      "invalid": [
        "a value below min"
      ],
      "notes": "A maximum unreachable by the step is legal HTML and usually a mistake."
    },
    {
      "attribute": "step",
      "appliesTo": [
        "number",
        "range",
        "date",
        "time",
        "datetime-local"
      ],
      "valid": [
        1,
        0.01,
        900,
        "any"
      ],
      "invalid": [
        0,
        -1
      ],
      "notes": "Steps count from min when it is present, and from the type's default base when it is not."
    },
    {
      "attribute": "multiple",
      "appliesTo": [
        "email",
        "file",
        "select"
      ],
      "valid": [
        true
      ],
      "invalid": [
        "on a text input, where it does nothing"
      ],
      "notes": "On email it makes the control accept a comma-separated list."
    },
    {
      "attribute": "accept",
      "appliesTo": [
        "file"
      ],
      "valid": [
        "image/*",
        ".png,.jpg",
        "application/pdf"
      ],
      "invalid": [
        "png",
        "a bare extension with no leading dot"
      ],
      "notes": "A filter for the picker, never a guarantee about the bytes that arrive."
    },
    {
      "attribute": "autocomplete",
      "appliesTo": [
        "text",
        "email",
        "tel",
        "url",
        "password",
        "number",
        "date",
        "select"
      ],
      "valid": [
        "email",
        "shipping postal-code",
        "one-time-code",
        "off"
      ],
      "invalid": [
        "email-address",
        "any token outside the specification's list"
      ],
      "notes": "Section and address-type prefixes come before the field name token."
    },
    {
      "attribute": "inputmode",
      "appliesTo": [
        "text",
        "search",
        "tel",
        "email",
        "url",
        "password"
      ],
      "valid": [
        "none",
        "text",
        "decimal",
        "numeric",
        "tel",
        "search",
        "email",
        "url"
      ],
      "invalid": [
        "number",
        "phone"
      ],
      "notes": "A keyboard hint only. It changes nothing about validation."
    },
    {
      "attribute": "readonly",
      "appliesTo": [
        "text",
        "email",
        "tel",
        "url",
        "password",
        "number",
        "date",
        "textarea"
      ],
      "valid": [
        true
      ],
      "invalid": [
        "on a checkbox, radio, select or file control"
      ],
      "notes": "A read-only value is still submitted; a disabled one is not."
    }
  ]
}
