Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-12-19. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

Common validation errors when creating issue forms

You may see some of these common validation errors when creating, saving, or viewing issue forms.

Note

Issue forms are currently in beta and subject to change.

Required top level key name is missing

The template does not contain a name field, which means it is not clear what to call your issue template when giving users a list of options.

Example of "required top level key name is missing" error

description: "Thank you for reporting a bug!"
...

The error can be fixed by adding name as a key.

name: "Bug report"
description: "Thank you for reporting a bug!"
...

key must be a string

This error message means that a permitted key has been provided, but its value cannot be parsed as the data type is not supported.

Example of "key must be a string" error

The description below is being parsed as a Boolean, but it should be a string.

name: "Bug report"
description: true
...

The error can be fixed by providing a string as the value. Strings may need to be wrapped in double quotes to be successfully parsed. For example, strings that contain ' must be wrapped in double quotes.

name: "Bug report"
description: "true"
...

Empty strings, or strings consisting of only whitespaces, are also not permissible when the field expects a string.

name: ""
description: "File a bug report"
assignees: "      "
...

The error can be fixed by correcting the value to be a non-empty string. If the field is not required, you should delete the key-value pair.

name: "Bug Report"
description: "File a bug report"
...

input is not a permitted key

An unexpected key was supplied at the top level of the template. For more information about which top-level keys are supported, see Syntax for issue forms.

Example of "input is not a permitted key" error

name: "Bug report"
hello: world
...

The error can be fixed by removing the unexpected keys.

name: "Bug report"
...

Forbidden keys

YAML parses certain strings as Boolean values. To avoid this, we have explicitly forbidden the usage of the following keys:

y, Y, yes, Yes, YES, n, N, no, No, NO, true, True, TRUE, false, False, FALSE, on, On, ON, off, Off, OFF

The error can be fixed by removing the forbidden keys.

Body must contain at least one non-markdown field

Issue forms must accept user input, which means that at least one of its fields must contain a user input field. A markdown element is static text, so a body array cannot contain only markdown elements.

Example of "body must contain at least one non-markdown field" error

name: "Bug report"