Commit 22747e6b authored by Dietmar Maurer's avatar Dietmar Maurer

fix bug #368: use vtype 'DnsName' to verify host names

parent cb71474e
......@@ -84,17 +84,11 @@ Ext.define('PVE.openvz.CreateWizard', {
{
xtype: 'pvetextfield',
name: 'hostname',
vtype: 'DnsName',
value: '',
fieldLabel: 'Hostname',
skipEmptyText: true,
allowBlank: true,
validator: function(value) {
var hostnamere = /^[a-zA-Z0-9\-.]+$/;
if (value && !hostnamere.test(value)) {
return "Hostname contains invalid characters !";
}
return true;
}
allowBlank: true
}
],
column2: [
......
......@@ -30,6 +30,7 @@ Ext.define('PVE.openvz.DNS', {
items: {
xtype: 'textfield',
name: 'hostname',
vtype: 'DnsName',
value: '',
fieldLabel: 'Hostname',
allowBlank: true,
......
......@@ -68,6 +68,7 @@ Ext.define('PVE.qemu.CreateWizard', {
{
xtype: 'textfield',
name: 'name',
vtype: 'DnsName',
value: '',
fieldLabel: gettext('Name'),
allowBlank: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment