]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: clone: validate name
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 17 Apr 2023 07:09:13 +0000 (09:09 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 24 Apr 2023 10:09:52 +0000 (12:09 +0200)
As reported in the community forum[0], as opposed to VM/LXC creation,
there is no validation for the name in the clone dialog. Use the same
validation as the guest creation wizards do to catch errors early,
before sending the API request.

[0]: https://forum.proxmox.com/threads/125883/#post-549304

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
www/manager6/window/Clone.js

index e94cd92dccd0adcdb2081f9603ef9291fddd0f28..e4ea17adfc6bb0cc8f306858a464f7a75504f21c 100644 (file)
@@ -191,6 +191,7 @@ Ext.define('PVE.window.Clone', {
        {
            xtype: 'textfield',
            name: 'name',
+           vtype: 'DnsName',
            allowBlank: true,
            fieldLabel: me.guestType === 'lxc' ? gettext('Hostname') : gettext('Name'),
        },