diff --git a/libs/editor/settings/wireguardpeerwidget.cpp b/libs/editor/settings/wireguardpeerwidget.cpp --- a/libs/editor/settings/wireguardpeerwidget.cpp +++ b/libs/editor/settings/wireguardpeerwidget.cpp @@ -199,11 +199,10 @@ WireGuardPeerWidget::EndPointValid WireGuardPeerWidget::isEndpointValid(QString &address, QString &port) { - // Create a Reg Expression validator to do simple check for a valid qualified domain name - // which checks to see that there are between 2 and 63 strings of at least 2 characters each - // separated by '.', so "ab.cc" is valid but "a.cc" is not. The full string must also be less - // than 255 characters long. - static QRegExpValidator fqdnValidator(QRegExp(QLatin1String("(?=.{5,254}$)([a-zA-Z0-9][a-zA-Z0-9-]{1,62}\\.){1,63}[a-zA-Z]{2,63}")), nullptr); + // Create a Reg Expression validator to do a simple check for a valid qualified domain name + // which checks to see that there are between 2 and 63 strings of at least 1 character each + // separated by '.'. The full string must also be less than 255 characters long. + static QRegExpValidator fqdnValidator(QRegExp(QLatin1String("(?=.{3,254}$)([a-zA-Z0-9][a-zA-Z0-9-]{0,62}\\.){1,63}[a-zA-Z]{1,63}")), nullptr); static SimpleIpV4AddressValidator ipv4Validator; static SimpleIpV6AddressValidator ipv6Validator; int pos = 0;