ui: clone: validate name

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>
This commit is contained in:
Fiona Ebner 2023-04-17 09:09:13 +02:00 committed by Thomas Lamprecht
parent 0d1108b26c
commit 54fbdcd1c0

View File

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