[pve-devel] [PATCH] Add DNS search value validation in create CT interface

Damien PIQUET piqudam at gmail.com
Fri Mar 1 21:26:18 CET 2013


Signed-off-by: Damien PIQUET <piqudam at gmail.com>
---
 www/manager/openvz/CreateWizard.js |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/www/manager/openvz/CreateWizard.js b/www/manager/openvz/CreateWizard.js
index 28f0114..fb5a136 100644
--- a/www/manager/openvz/CreateWizard.js
+++ b/www/manager/openvz/CreateWizard.js
@@ -234,6 +234,13 @@ Ext.define('PVE.openvz.CreateWizard', {
 				    field.setDisabled(!value);
 				    field.clearInvalid();
 				}
+			    },
+			    validator: function(value) {
+				var hostnamere = /^[a-zA-Z0-9\-.]+$/;
+				if(value && !hostnamere.test(value)) {
+				   return "Domain contains invalid characters !";
+				}
+				return true;
 			    }
 			},
 			{
-- 
1.7.10.4




More information about the pve-devel mailing list