From b9b274f2d6ab0e1ab6fccb2f98545702eedf9197 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Tue, 24 Jul 2018 02:51:44 -0400 Subject: [PATCH] Disallow callsigns with both prefixes and suffixes --- CallsignValidator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/CallsignValidator.cpp b/CallsignValidator.cpp index ddcd64f..02771a4 100644 --- a/CallsignValidator.cpp +++ b/CallsignValidator.cpp @@ -10,6 +10,7 @@ auto CallsignValidator::validate (QString& input, int& pos) const -> State { auto match = re_.match (input, 0, QRegularExpression::PartialPreferCompleteMatch); input = input.toUpper (); + if (input.count(QLatin1Char('/')) > 1) return Invalid; if (match.hasMatch ()) return Acceptable; if (!input.size () || match.hasPartialMatch ()) return Intermediate; pos = input.size ();