From e6dddc1b27fc483ef01b0e8cf41695135284c339 Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sun, 21 Jun 2026 18:28:49 -0500 Subject: [PATCH] fix(proxmox): align ISO frontend validation with backend Frontend regex required a .iso suffix that the backend does not enforce. Changed from /^[a-zA-Z0-9_-]+:iso\/.+\.iso$/ to /^[a-zA-Z0-9_-]+:iso\/[^,]+$/ to match the backend rule: must start with storage:iso/ and contain no commas. Updated hint and error text accordingly. --- src/components/Proxmox/CreateVmDialog.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Proxmox/CreateVmDialog.tsx b/src/components/Proxmox/CreateVmDialog.tsx index 2a189226..d644365d 100644 --- a/src/components/Proxmox/CreateVmDialog.tsx +++ b/src/components/Proxmox/CreateVmDialog.tsx @@ -70,11 +70,11 @@ export function CreateVmDialog({ isOpen, clusterId, onClose, onCreated }: Create }); }, [isOpen, clusterId]); - const ISO_RE = /^[a-zA-Z0-9_-]+:iso\/.+\.iso$/; + const ISO_RE = /^[a-zA-Z0-9_-]+:iso\/[^,]+$/; const validateIso = (value: string): string => { if (!value) return ''; - return ISO_RE.test(value) ? '' : "Must be in the format 'storage:iso/filename.iso'"; + return ISO_RE.test(value) ? '' : "Must be in the format 'storage:iso/filename'"; }; const handleIsoChange = (value: string) => { @@ -279,7 +279,7 @@ export function CreateVmDialog({ isOpen, clusterId, onClose, onCreated }: Create {isoError ? (

{isoError}

) : ( -

Format: storage:iso/filename.iso

+

Format: storage:iso/filename

)}