check length

This commit is contained in:
tavo 2024-09-23 05:05:10 -06:00
parent 0736dfeb63
commit 590b5032b0
2 changed files with 36 additions and 30 deletions

View file

@ -132,6 +132,12 @@ function initializeEventListeners() {
errorMessage.innerHTML = `Revisar la disponibilidad del sitio tardó mucho tiempo, intentalo más tarde.`;
}, 10000);
if (directory.length < 4 || directory.length > 35) {
errorMessage.style.display = "block";
errorMessage.innerHTML = `El nombre del sitio debe tener entre 4 y 35 caracteres.`;
return;
}
try {
const exists = await checkDirectoryExists(directory);