bugfix #301 Add container hostname validation in GUI
Signed-off-by: Damien PIQUET <piqudam@gmail.com>
This commit is contained in:
parent
28bd65f739
commit
0d3641ee59
@ -87,7 +87,14 @@ Ext.define('PVE.openvz.CreateWizard', {
|
||||
value: '',
|
||||
fieldLabel: 'Hostname',
|
||||
skipEmptyText: true,
|
||||
allowBlank: true
|
||||
allowBlank: true,
|
||||
validator: function(value) {
|
||||
var hostnamere = /^[a-zA-Z0-9\-.]+$/;
|
||||
if (value && !hostnamere.test(value)) {
|
||||
return "Hostname contains invalid characters !";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
],
|
||||
column2: [
|
||||
@ -124,7 +131,7 @@ Ext.define('PVE.openvz.CreateWizard', {
|
||||
validator: function(value) {
|
||||
var pw = me.down('field[name=password]').getValue();
|
||||
if (pw !== value) {
|
||||
return "Passowords does not match!";
|
||||
return "Passwords does not match!";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user