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:
1 parent
8814724567
commit
91a785703f
3 files changed
+3
No files matched your search
@@ -142,6 +142,7 @@ Ext.define('PVE.window.DirMapEditWindow', {
|
||||
},
|
||||
name: 'name',
|
||||
allowBlank: false,
|
||||
vtype: 'ConfigId',
|
||||
},
|
||||
{
|
||||
xtype: 'pveNodeSelector',
|
||||
|
||||
Reference in new issue
Block a user