Edit online

Validating YAML Documents

Automatic Validation

Oxygen XML Editor includes built-in validation engine for YAML documents to help you keep them well-formed. YAML documents are validated automatically as you type and the validation engine detects syntax errors (such as improper indentation or duplicate keys), based on the YAML specification. The built-in validation also works on files that consist of multiple YAML documents.

Manual Validation Actions

To manually validate the currently edited YAML document, use one of the following actions:

Validate
Available from the Validation drop-down menu on the toolbar, the Document > Validate menu, or from the Validate submenu when invoking the contextual menu on one or more YAML documents in the Project view. The validation is done based on the YAML specification.
Validate with

Available from the Validation drop-down menu on the toolbar or the Document > Validate menu. This action opens a dialog box that allows you to specify a JSON Schema for validating the current YAML document (it also works on files that consist of multiple YAML documents).

Note: The Validate with action does not work for files loaded through a custom protocol plugin developed independently and added to Oxygen XML Editor after installation.
Check Well-Formedness (Ctrl + Shift + W (Command + Shift + W on macOS))

Available from the Validation drop-down menu on the toolbar, the Document > Validate menu, or from the Validate submenu when invoking the contextual menu in the Project view. This action checks the document for syntax errors to make sure it is well-formed.

Validate with Schema

Available from the Validate submenu when invoking the contextual menu on one or more YAML documents in the Project view. This action opens a dialog box that allows you to specify a JSON Schema to be used for the validation.

Batch Validation

The built-in validation engine can also be used to batch validation multiple YAML files at once by selecting multiple files in the Project view, right-click, and select Validate > Check Well-Formedness or Validate > Validate. This automatically validates the selected files using the built-in YAML validation engine, based on the YAML specification.