0
0

🩹 Add domain length check to regex

This commit is contained in:
DrMaxNix 2021-04-03 15:58:42 +02:00 committed by GitHub
parent b8ee8dcc0f
commit 2ad969b695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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