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 <me@dualfroz.com>
Link: https://lore.proxmox.com/20260929141313.2873638-1-me@dualfroz.com
This commit is contained in:
dualfroz committed 2026-09-30 11:44:39 +02:00
1 parent 8814724567
commit 91a785703f
3 files changed
+3

No files matched your search

+1
View File
@@ -153,6 +153,7 @@ Ext.define('PVE.window.USBMapEditWindow', {
},
name: 'name',
allowBlank: false,
vtype: 'ConfigId',
},
{
xtype: 'displayfield',