diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index 0b154522cf6..594f7cc01ac 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -200,10 +200,10 @@ function isValidJsonString(str) { cloudStack.validate = { vmHostName: function(args) { // 1 ~ 63 characters long - // ASCII letters 'a' through 'z' (case-insensitive), digits '0' through '9', hyphen ('-') + // ASCII letters 'a' through 'z', 'A' through 'Z', digits '0' through '9', hyphen ('-') // must start with a letter // must end with a letter or a digit (must not end with a hyphen) - var regexp = /^[a-z]{1}[a-z0-9\-]{0,61}[a-z0-9]{0,1}$/; + var regexp = /^[a-zA-Z]{1}[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]{0,1}$/; var b = regexp.test(args); //true or false if(b == false) cloudStack.dialog.notice({ message: 'message.validate.instance.name' });