[pve-devel] [PATCH] fix #4585 : toolkit: configid type: add missing "-" character support
Alexandre Derumier
aderumier at odiso.com
Sat Mar 11 14:02:42 CET 2023
JsonSchema is already ok:
$CONFIGID_RE = qr/[a-z][a-z0-9_-]+/i;
This is blocking creation of snapshot name with "-" in gui.
(works fine command line)
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
src/Toolkit.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Toolkit.js b/src/Toolkit.js
index 2f4a01a..4314fb4 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -110,7 +110,7 @@ Ext.apply(Ext.form.field.VTypes, {
gettext("Must end with") + ": 'A-Z', 'a-z', '0-9'<br />",
ConfigId: function(v) {
- return (/^[a-z][a-z0-9_]+$/i).test(v);
+ return (/^[a-z][a-z0-9_-]+$/i).test(v);
},
ConfigIdText: gettext("Allowed characters") + ": 'A-Z', 'a-z', '0-9', '_'<br />" +
gettext("Minimum characters") + ": 2<br />" +
--
2.30.2
More information about the pve-devel
mailing list