--- url: https://developer.youcan.shop/changelog/theme-file-validation.md --- Every theme file is checked when it is saved. If a save is rejected, you get the list of errors with their file and line. Themes must contain a layout and nine templates. The `doc` tag is supported. *** # File checks * Snippets and layouts are now checked for Liquid syntax errors when you save them. Locales are checked against the locale format. * If a save is rejected, you get a 422 with `{"errors": [{"file", "line", "key", "message", "severity"}]}`. You get the same body from the code editor, the theme editor and `theme dev`. Before, the body was different on each of them. * In the code editor, errors in Liquid and JSON files are marked on their line while you type. * In the theme editor, the settings and the template are both checked before either one is saved. * A theme upload is checked file by file before any file is saved. If one file has an error, the upload is rejected with the errors of all files. See [File checks](/themes/architecture#file-checks). # Required files * `layout/theme.liquid` and the `index`, `product`, `collection`, `list-collections`, `page`, `cart`, `search`, `thankyou` and `upsell` templates are required. * A theme upload without one of them is rejected with the list of missing files. * You cannot delete a required file in the code editor or with `theme dev`. See [Required files](/themes/architecture#required-files). # Liquid * Use `{% doc %}` to document a snippet or a block. Its content is not parsed or rendered. See [doc](/themes/tags/doc).