mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-10 12:04:15 +00:00
implement and use new DnsName vtype
This commit is contained in:
parent
a44bd84f38
commit
667b2be914
@ -62,7 +62,12 @@ Ext.apply(Ext.form.field.VTypes, {
|
|||||||
HttpProxy: function(v) {
|
HttpProxy: function(v) {
|
||||||
return (/^http:\/\/.*$/).test(v);
|
return (/^http:\/\/.*$/).test(v);
|
||||||
},
|
},
|
||||||
HttpProxyText: gettext('Example') + ": http://username:password@host:port/"
|
HttpProxyText: gettext('Example') + ": http://username:password@host:port/",
|
||||||
|
|
||||||
|
DnsName: function(v) {
|
||||||
|
return (/^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$/).test(v);
|
||||||
|
},
|
||||||
|
DnsNameText: gettext('This is not a valid DNS name')
|
||||||
});
|
});
|
||||||
|
|
||||||
// we dont want that a displayfield set the form dirty flag!
|
// we dont want that a displayfield set the form dirty flag!
|
||||||
|
@ -28,6 +28,7 @@ Ext.define('PVE.qemu.Options', {
|
|||||||
items: {
|
items: {
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
|
vtype: 'DnsName',
|
||||||
value: '',
|
value: '',
|
||||||
fieldLabel: gettext('Name'),
|
fieldLabel: gettext('Name'),
|
||||||
allowBlank: true
|
allowBlank: true
|
||||||
|
Loading…
Reference in New Issue
Block a user