|
@@ -13,6 +13,6 @@ class ValidateUtil {
|
|
fun isPositiveInt(num: String): Boolean = regexPositiveInt.matches(num)
|
|
fun isPositiveInt(num: String): Boolean = regexPositiveInt.matches(num)
|
|
fun isUrl(url: String): Boolean = regexUrl.matches(url)
|
|
fun isUrl(url: String): Boolean = regexUrl.matches(url)
|
|
fun isIPHost(url: String): Boolean = regexIPHost.matches(url)
|
|
fun isIPHost(url: String): Boolean = regexIPHost.matches(url)
|
|
- fun isPort(port: String): Boolean = isPositiveInt(port) && port.toInt() < 65535
|
|
|
|
|
|
+ fun isPort(port: String): Boolean = isPositiveInt(port) && port.length < 6 && port.toInt() < 65535
|
|
}
|
|
}
|
|
}
|
|
}
|