summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/container.xml.in2
-rw-r--r--interface-definitions/dns-domain-name.xml.in2
-rw-r--r--interface-definitions/include/constraint/host-name.xml.in3
3 files changed, 5 insertions, 2 deletions
diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in
index 4614bc892..91fb4dba0 100644
--- a/interface-definitions/container.xml.in
+++ b/interface-definitions/container.xml.in
@@ -117,7 +117,7 @@
<properties>
<help>Container host name</help>
<constraint>
- <regex>[A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9]</regex>
+ #include <include/constraint/host-name.xml.in>
</constraint>
<constraintErrorMessage>Host-name must be alphanumeric and can contain hyphens</constraintErrorMessage>
</properties>
diff --git a/interface-definitions/dns-domain-name.xml.in b/interface-definitions/dns-domain-name.xml.in
index a599a75cc..d77c94898 100644
--- a/interface-definitions/dns-domain-name.xml.in
+++ b/interface-definitions/dns-domain-name.xml.in
@@ -33,7 +33,7 @@
<properties>
<help>System host name (default: vyos)</help>
<constraint>
- <regex>[A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9]</regex>
+ #include <include/constraint/host-name.xml.in>
</constraint>
</properties>
</leafNode>
diff --git a/interface-definitions/include/constraint/host-name.xml.in b/interface-definitions/include/constraint/host-name.xml.in
new file mode 100644
index 000000000..202c200f4
--- /dev/null
+++ b/interface-definitions/include/constraint/host-name.xml.in
@@ -0,0 +1,3 @@
+<!-- include start from constraint/host-name.xml.in -->
+<regex>[A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9]</regex>
+<!-- include end -->