implement and use new DnsName vtype
This commit is contained in:
parent
24e48ad4e1
commit
1fcc2d4bed
@ -62,7 +62,12 @@ Ext.apply(Ext.form.field.VTypes, {
|
||||
HttpProxy: function(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!
|
||||
|
@ -28,6 +28,7 @@ Ext.define('PVE.qemu.Options', {
|
||||
items: {
|
||||
xtype: 'textfield',
|
||||
name: 'name',
|
||||
vtype: 'DnsName',
|
||||
value: '',
|
||||
fieldLabel: gettext('Name'),
|
||||
allowBlank: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user