Commit 8890ea05 authored by Xiaowu Zhang's avatar Xiaowu Zhang

improve ip check

parent a77c6550
......@@ -56,15 +56,15 @@
info.innerHTML = "please start ip with http:// or https://";
return;
}
if (port === -1 || portEnd !== -1) {
info.innerHTML = "input port number";
return;
}
if (checkIp(ipValue) === false) {
info.innerHTML =
"invalide ip: ip should like xxx.xxx.xxx.xxx(xxx is between 0 ~ 255)";
return;
}
if (port === -1 || portEnd !== -1) {
info.innerHTML = "input port number";
return;
}
if (!endWith(value, "/")) {
info.innerHTML = "not end with /";
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment