CS-14588: cloudstack 3.0 UI - VM Wizard - name field - allow uppercase.

This commit is contained in:
Jessica Wang 2012-04-23 11:20:35 -07:00
parent 61a10de627
commit 69e6d2e906

View File

@ -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' });