Update and test folder regex

This commit is contained in:
Webber
2020-01-30 09:04:32 +01:00
committed by Webber Takken
parent 033a0990cb
commit a18b837919
3 changed files with 23 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ class Input {
}
static isValidFolderName(folderName) {
const validFolderName = new RegExp(/^(\.|\.\/)?(\.?\w+\/?)*$/);
const validFolderName = new RegExp(/^(\.|\.\/)?(\.?\w+([-_]?\w+)*\/?)*$/);
return validFolderName.test(folderName);
}