From: Dominik Csapak Date: Thu, 9 Apr 2020 14:10:41 +0000 (+0200) Subject: JSONSchema: extend pve-configid regex by '-' X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=6b0c18d4dbdaf5278a51190549db86b143acc4cd;hp=89ea13ef6b1555f92309da5c298e16579163eaf4 JSONSchema: extend pve-configid regex by '-' we use this format for all 'delete' options but we have some options that have a '-' in the name (e.g. 'sync-defaults-options') that cannot be deleted if it is not included Signed-off-by: Dominik Csapak --- diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 01a3cce..1d28f36 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -169,7 +169,7 @@ register_format('pve-configid', \&pve_verify_configid); sub pve_verify_configid { my ($id, $noerr) = @_; - if ($id !~ m/^[a-z][a-z0-9_]+$/i) { + if ($id !~ m/^[a-z][a-z0-9_-]+$/i) { return undef if $noerr; die "invalid configuration ID '$id'\n"; }