summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2025-01-09 00:20:08 -0600
committerIndrajit Raychaudhuri <irc@indrajit.com>2025-01-09 00:31:05 -0600
commitbe7fcf68576a8299185080c0da37f46e15489c41 (patch)
tree187096a8755257af9e779ac8391da2554bb731a3
parentfe50656a6f1509976d04e8a750083d54bad28ecc (diff)
downloadvyos-1x-be7fcf68576a8299185080c0da37f46e15489c41.tar.gz
vyos-1x-be7fcf68576a8299185080c0da37f46e15489c41.zip
xml: T5738: Reuse predefined regex constraint
-rw-r--r--interface-definitions/container.xml.in2
-rw-r--r--interface-definitions/include/haproxy/rule-backend.xml.i2
-rw-r--r--interface-definitions/include/haproxy/rule-frontend.xml.i2
3 files changed, 3 insertions, 3 deletions
diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in
index ad1815604..04318a7c9 100644
--- a/interface-definitions/container.xml.in
+++ b/interface-definitions/container.xml.in
@@ -131,7 +131,7 @@
<properties>
<help>Add custom environment variables</help>
<constraint>
- <regex>[-_a-zA-Z0-9]+</regex>
+ #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
</constraint>
<constraintErrorMessage>Environment variable name must be alphanumeric and can contain hyphen and underscores</constraintErrorMessage>
</properties>
diff --git a/interface-definitions/include/haproxy/rule-backend.xml.i b/interface-definitions/include/haproxy/rule-backend.xml.i
index b2be4fde4..1df9d5dcf 100644
--- a/interface-definitions/include/haproxy/rule-backend.xml.i
+++ b/interface-definitions/include/haproxy/rule-backend.xml.i
@@ -47,7 +47,7 @@
<properties>
<help>Server name</help>
<constraint>
- <regex>[-_a-zA-Z0-9]+</regex>
+ #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
</constraint>
<constraintErrorMessage>Server name must be alphanumeric and can contain hyphen and underscores</constraintErrorMessage>
</properties>
diff --git a/interface-definitions/include/haproxy/rule-frontend.xml.i b/interface-definitions/include/haproxy/rule-frontend.xml.i
index 001ae2d80..aeee1202e 100644
--- a/interface-definitions/include/haproxy/rule-frontend.xml.i
+++ b/interface-definitions/include/haproxy/rule-frontend.xml.i
@@ -47,7 +47,7 @@
<properties>
<help>Backend name</help>
<constraint>
- <regex>[-_a-zA-Z0-9]+</regex>
+ #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
</constraint>
<constraintErrorMessage>Server name must be alphanumeric and can contain hyphen and underscores</constraintErrorMessage>
</properties>