🩹 Add domain length check to regex
This commit is contained in:
parent
b8ee8dcc0f
commit
2ad969b695
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user