Skip to content

Commit

Permalink
fix host_regex, v4 and v6 not v4 and v4..
Browse files Browse the repository at this point in the history
  • Loading branch information
indy-independence committed Feb 18, 2021
1 parent b263d3b commit 001ef2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cnaas_nms/db/settings_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
r':((:[0-9a-fA-F]{1,4}){1,7}|:))'
)
FQDN_REGEX = r'([a-z0-9-]{1,63}\.)([a-z-][a-z0-9-]{1,62}\.?)+'
HOST_REGEX = f"^({IPV4_REGEX}|{IPV4_REGEX}|{FQDN_REGEX})$"
HOST_REGEX = f"^({IPV4_REGEX}|{IPV6_REGEX}|{FQDN_REGEX})$"
HOSTNAME_REGEX = r"^([a-z0-9-]{1,63})(\.[a-z0-9-]{1,63})*$"
host_schema = Field(..., regex=HOST_REGEX, max_length=253,
description="Hostname, FQDN or IP address")
Expand Down

0 comments on commit 001ef2e

Please sign in to comment.