mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	CS-14588: cloudstack 3.0 UI - VM Wizard - name field - allow uppercase.
This commit is contained in:
		
							parent
							
								
									61a10de627
								
							
						
					
					
						commit
						69e6d2e906
					
				@ -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' });	
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user