fix: fix port format validation bug
This commit is contained in:
@@ -16,6 +16,6 @@ bool InputFormatValidator::ValidateIpAddressFormat(const QString &aIpAddress)
|
|||||||
|
|
||||||
bool InputFormatValidator::ValidatePortFormat(const QString& aPort)
|
bool InputFormatValidator::ValidatePortFormat(const QString& aPort)
|
||||||
{
|
{
|
||||||
QRegularExpression regex("^([1-9]\\d{0,4}|0)$");
|
QRegularExpression regex("^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)$");
|
||||||
return regex.match(aPort).hasMatch();
|
return regex.match(aPort).hasMatch();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user