0
0

🩹 fix and simplify regex #5

Merged
thetek42 merged 6 commits from ui-test into main 2021-04-03 16:00:32 +02:00
Showing only changes of commit 51d2a29871 - Show all commits

View File

@ -127,7 +127,7 @@ function dnswatch_search() {
function is_valid_domain(str) {
let regex = /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/;
let regex = /^([a-z0-9\-]+\.)+[a-z0-9]{2,}$/;
return regex.test(str);
}