Skip to content

Commit

Permalink
validation_table.html: Special message if root object not array
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Nov 28, 2024
1 parent 2c6927f commit 802f2e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cove_bods/templates/cove_bods/validation_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@
{% elif errors.0.validator == "type" and errors.0.validator_value == "number" %}
<strong><code>{{ errors.0.path_ending }}</code> should be a number. Check that the value is not null, and doesn’t contain any characters other than 0-9 and dot (<code>.</code>). Number values should not be in quotes.</strong>
{% elif errors.0.validator == "type" and errors.0.validator_value == "array" %}
<strong><code>{{ errors.0.path_ending }}</code> should be a JSON array. Check that value(s) appear within square brackets, [...]</strong>
{% if errors.0.path_ending == "" %}
<strong>The dataset should be a JSON array. Check that the object(s) appear within square brackets, [...]</strong>
{% else %}
<strong><code>{{ errors.0.path_ending }}</code> should be a JSON array. Check that value(s) appear within square brackets, [...]</strong>
{% endif %}
{% elif errors.0.validator == "type" and errors.0.validator_value == "string" %}
<strong><code>{{ errors.0.path_ending }}</code> should be a string. Check that the value is not null, and has quotes at the start and end. Escape any quotes in the value with <code>\</code></strong>
{% elif errors.0.validator == "type" and errors.0.validator_value == "boolean" %}
Expand Down

0 comments on commit 802f2e7

Please sign in to comment.