From 91a785703fa50c1b8f1a88b4976bf9487d58af1c Mon Sep 17 00:00:00 2001 From: Michal Fox Date: Tue, 29 Sep 2026 16:13:13 +0200 Subject: [PATCH] fix #5608: ui: resource mappings: validate the name like the API does The API only accepts resource mapping IDs in the 'pve-configid' format, but the name field of the PCI, USB and directory mapping windows takes any value. A name like 'gpu@node1' is thus only rejected after submitting, with a generic "invalid configuration ID" error that does not tell which characters are allowed. Use the existing 'ConfigId' vtype, so the field is marked invalid right away and its tooltip lists the allowed characters. Signed-off-by: Michal Fox Link: https://lore.proxmox.com/20260929141313.2873638-1-me@dualfroz.com --- www/manager6/window/DirMapEdit.js | 1 + www/manager6/window/PCIMapEdit.js | 1 + www/manager6/window/USBMapEdit.js | 1 + 3 files changed, 3 insertions(+) diff --git a/www/manager6/window/DirMapEdit.js b/www/manager6/window/DirMapEdit.js index 841ff1f..bc6a7d0 100644 --- a/www/manager6/window/DirMapEdit.js +++ b/www/manager6/window/DirMapEdit.js @@ -142,6 +142,7 @@ Ext.define('PVE.window.DirMapEditWindow', { }, name: 'name', allowBlank: false, + vtype: 'ConfigId', }, { xtype: 'pveNodeSelector', diff --git a/www/manager6/window/PCIMapEdit.js b/www/manager6/window/PCIMapEdit.js index 625f4ad..28aa477 100644 --- a/www/manager6/window/PCIMapEdit.js +++ b/www/manager6/window/PCIMapEdit.js @@ -217,6 +217,7 @@ Ext.define('PVE.window.PCIMapEditWindow', { }, name: 'id', allowBlank: false, + vtype: 'ConfigId', }, { xtype: 'displayfield', diff --git a/www/manager6/window/USBMapEdit.js b/www/manager6/window/USBMapEdit.js index 5c90ea3..ba5e2c6 100644 --- a/www/manager6/window/USBMapEdit.js +++ b/www/manager6/window/USBMapEdit.js @@ -153,6 +153,7 @@ Ext.define('PVE.window.USBMapEditWindow', { }, name: 'name', allowBlank: false, + vtype: 'ConfigId', }, { xtype: 'displayfield',