Skip to main content

ValidSchemaName

Makes sure that the schema name property doesn't exceed the 25 character limit, and that its translation key is valid.


The following examples contain code snippets that either fail or pass this check.

In the following example, the schema name value exceeds the 25 character limit:

{% schema %}
"name": "This name is too long because it exceeds the 25 character limit."
{% endschema %}

In the following example, the schema name value is within the 25 character limit:

{% schema %}
"name": "A concise name"
{% endschema %}

In the following example, the translation key doesn't have an entry my-translation-key in the locales default schema JSON file:

{% schema %}
"name": "t:my-translation-key"
{% endschema %}

In the following example, the translation key has an entry my-translation-key in the locales default schema JSON file:

{% schema %}
"name": "t:my-translation-key"
{% endschema %}

In the following example, the translation key my-translation-key in the locales default schema JSON file has a translation value that exceeds the 25 character limit:

{% schema %}
"name": "t:my-translation-key"
{% endschema %}
{
"my-translation-key": "My overly long translation that exceeds the 25 character limit."
}

In the following example, the translation key my-translation-key in the locales default schema JSON file has a translation value that doesn't exceed the 25 character limit:

{% schema %}
name: "t:my-translation-key"
{% endschema %}
{
"my-translation-key": "My translation"
}

The following example contains the default configuration for this check:

ValidSchemaName:
enabled: true
severity: error
ParameterDescription
enabledWhether this check is enabled.
severityThe severity of the check.

Anchor to Disabling this checkDisabling this check

Disabling this check isn't recommended.


Was this page helpful?