Validate Content Blocks

The document properties validator checks for any missing or incorrect properties in your project.

Debug template 15

Before we can validate these fields, we need to define them! In the interest of keeping information organized, I'm going to have to ask you to open the Report template properties: Content Blocks page of the Administration manual that explains how to define Content Blocks and Block Groups.

We want to ensure that the latest and most up-to-date information about each topic is in a single page.

After you've defined these document properties within your report template properties, run the project validation as normal. Make sure to check the Validator log below to see what properties are missing and might break your Word document on export.

No Associated Block Group

Each Content Block needs to be associated with a Block Group. If there is a Content Block that doesn't have a Block Group set, the validator will show a warning like the following:

[WARNING] No associated content block group found for Example Appendix Content. To correctly validate the content block, set the block group to the appropriate content block group in the report template properties.

To resolve this, just edit the Content Block referenced in the warning ("Example Appendix Content" in this example) and select the correct Block Group from the dropdown at the top.

Missing fields within a Content Block

In this example, the Content Block doesn't contain one of the fields that the report template is looking for. When this happens, the validator will display an error like:

[ERROR] Content Block 'Conclusions and Recommendations' is missing the field 'OverallRisk', which is required by your report template. Please add the field to the content block.

To resolve this, just edit the Content Block referenced in the warning ("Conclusions and Recommendations" in this example) to add an #[OverallRisk]# field and a value for that field.

Incorrect fields within a Content Block

In this example, the Content Block's OverallRisk field has acceptable values of High, Medium, or Low defined in the report template properties. The Content Block has the field set to a value of Moderate. In the validator, the following error appears:

[ERROR] Value 'Moderate' is invalid for field 'OverallRisk' in Content Block 'Conclusions and Recommendations'. Allowed values are High, Medium, Low

To resolve this, just edit the Content Block referenced in the warning ("Conclusions and Recommendations" in this example) and edit the value of the OverallRisk field to match one of the acceptable values.

Empty fields within a Content Block

In this example, the Content Block's Description field exists but is empty. In the validator, the following error appears:

[ERROR] Your report template specifies that the field 'Description' is required, but Content Block 'Conclusions and Recommendations' does not provide a value for it. Please provide some value.

To resolve this, just edit the Content Block referenced in the warning ("Conclusions and Recommendations" in this example) and add a value for that field ("Description" in this example).

No Content Blocks Defined

If you haven't defined any document properties in your report template properties, you'll get a warning when you validate your project.

[WARNING] The selected template doesn't define any Content Block fields. Dradis doesn't know what Content Block fields your report template is looking for.
[WARNING] Go to Admin > Templates > Reports and define some Content Block fields for this report template.
[WARNING] More details: https://dradisframework.com/support/guides/administration/report_template_properties.html#content-blocks

If you see the above output, head over to the link in the message to add your content blocks so that Dradis knows what Block Groups and fields to look for.

Next help article: Validate Evidence fields →