Skip to content

Commit

Permalink
Validate hostname. (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
csadorf authored Sep 28, 2022
1 parent 009d093 commit 69ad4a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ hostname:
type: str
default:
placeholder: aiidalab.contoso.com
# Hostname validator from: https://stackoverflow.com/a/1420225
validator: >
{% if not hostname|regex_search(
"^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$"
)%}Invalid hostname.{% endif %}
help: |
Fully qualified domain name of where the deployment is going to be reachable.
Expand Down

0 comments on commit 69ad4a8

Please sign in to comment.