]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
ui: usbselector: return string not false when invalid
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 26 Sep 2019 14:36:23 +0000 (16:36 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 26 Sep 2019 14:36:25 +0000 (16:36 +0200)
If the return value is not exact Boolean(true) this is used for
error, so false gets converted to string and shown in error tooltip,
address that

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/form/USBSelector.js

index ed35bde0df937980db239f5db488b6a541e8569f..c2497ebc872407fc011f1d28d026cc8d934a7767 100644 (file)
@@ -24,7 +24,7 @@ Ext.define('PVE.form.USBSelector', {
        } else if (me.type === 'port') {
            return (/^[0-9]+\-[0-9]+(\.[0-9]+)*$/).test(value);
        }
-       return false;
+       return gettext("Invalid Value");
     },
 
     initComponent: function() {