fix(webui): allow digits in itemtype for add items(raw) #2870
@ -2844,8 +2844,8 @@ function removeCountItems(uniqueName, count) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function addItemByItemType() {
 | 
					function addItemByItemType() {
 | 
				
			||||||
    const ItemType = document.getElementById("typeName-type").value;
 | 
					    const ItemType = document.getElementById("typeName-type").value;
 | 
				
			||||||
    // Must start with "/Lotus/", contain only A–Z letters, no "//", and not end with "/"
 | 
					    // Must start with "/Lotus/", contain only letters A–Z, digits 0–9, no "//", and not end with "/"
 | 
				
			||||||
    if (!ItemType || !/^\/Lotus\/(?:[A-Za-z]+(?:\/[A-Za-z]+)*)$/.test(ItemType)) {
 | 
					    if (!ItemType || !/^\/Lotus\/(?:[A-Za-z0-9]+(?:\/[A-Za-z0-9]+)*)$/.test(ItemType)) {
 | 
				
			||||||
        $("#typeName-type").addClass("is-invalid").focus();
 | 
					        $("#typeName-type").addClass("is-invalid").focus();
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user