[tutorial 083] A variable with custom validation

This commit is contained in:
egarette@silique.fr 2024-11-02 14:58:56 +01:00
parent 01aeeae707
commit 0a9139fdbe

View file

@ -23,3 +23,9 @@ dns_over_https: # DNS over HTTPS
provider is not custom provider is not custom
{% endif %} {% endif %}
description: if "dns_over_https.provider" is not "Custom" description: if "dns_over_https.provider" is not "Custom"
validators:
- jinja: |
{% if dns_over_https.custom_dns_url.startswith('http://') %}
only https is allowed
{% endif %}
description: must starts with 'https://' only