[tutorial 083] A variable with custom validation
This commit is contained in:
parent
51741a02ea
commit
dface10ca7
1 changed files with 6 additions and 0 deletions
|
|
@ -20,6 +20,12 @@ dns_over_https: # DNS over HTTPS
|
||||||
custom_dns_url:
|
custom_dns_url:
|
||||||
description: Custom DNS URL
|
description: Custom DNS URL
|
||||||
type: web_address
|
type: web_address
|
||||||
|
validators:
|
||||||
|
- jinja: |-
|
||||||
|
{% if dns_over_https.custom_dns_url.startswith('http://') %}
|
||||||
|
only https is allowed
|
||||||
|
{% endif %}
|
||||||
|
description: must starts with 'https://' only
|
||||||
disabled:
|
disabled:
|
||||||
jinja: |-
|
jinja: |-
|
||||||
{% if _.provider is propertyerror or _.provider != 'Custom' %}
|
{% if _.provider is propertyerror or _.provider != 'Custom' %}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue