From b198e35c6ebec8bf1bccada3186583c3228f9a21 Mon Sep 17 00:00:00 2001 From: "Ed (ODSC)" Date: Wed, 6 Sep 2023 14:33:56 +0100 Subject: [PATCH] cove_rdls/templates/cove_rdls/validation_table.html: Fix first links error message --- cove_rdls/templates/cove_rdls/validation_table.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cove_rdls/templates/cove_rdls/validation_table.html b/cove_rdls/templates/cove_rdls/validation_table.html index e20cf40..a6544bf 100644 --- a/cove_rdls/templates/cove_rdls/validation_table.html +++ b/cove_rdls/templates/cove_rdls/validation_table.html @@ -22,7 +22,9 @@

- {% if errors.0.validator == "const" and errors.0.validator_value == "describedby" %} + {% if errors.0.validator == "const" and errors.0.validator_value == "describedby" and errors.0.path|links_rel_first %} + {{ errors.0.path_ending }} is not 'describedby'. The first item in the links array must be a link to the canonical URL of the RDLS JSON schema with relation type 'describedby'. + {% elif errors.0.validator == "const" and errors.0.validator_value == "describedby" %} {{ errors.0.path_ending }} does not match the regex {{ errors.0.validator_value }}. With the exception of the first item in the links array, the value of {{ errors.0.path_ending }} must not be 'describedby'. {% elif errors.0.validator == "const" %} {{ errors.0.path_ending}} does not match constant specified in schema. The value must be {{ errors.0.validator_value }}. @@ -49,7 +51,8 @@ {{ value }} does not match any code. {{ value }} must match a code from the codelist specified in the schema. {% endwith %} {% elif errors.0.validator == "pattern" and errors.0.path|links_rel_first %} - {{ errors.0.path_ending }} is not 'describedby'. The first item in the links array must be a link to the canonical URL of the RDLS JSON schema with relation type 'describedby'. + {{ errors.0.path_ending }} is not 'describedby'. The first item in the links array must be a link +to the canonical URL of the RDLS JSON schema with relation type 'describedby'. {% elif errors.0.validator == "pattern" and errors.0.path|links_rel_subsequent %} {{ errors.0.path_ending }} is 'describedby'. With the exception of the first item in the links array, the value of {{ errors.0.path_ending }} must not be 'describedby'. {% elif errors.0.validator == "pattern" %}