Disallow callsigns with both prefixes and suffixes

This commit is contained in:
Jordan Sherer 2018-07-24 02:51:44 -04:00
parent 4a17062487
commit b9b274f2d6

View File

@ -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 ();