18 :
QValidator(parent), m_minLength(minLength), m_maxLength(maxLength)
20 if (minLength < 1) { m_optionalValue =
true; };
24 :
QValidator(parent), m_optionalValue(optionalValue), m_minLength(minLength), m_maxLength(maxLength)
26 if (minLength < 1) { m_optionalValue =
true; };
31 static const QString chars(
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
47 for (
const QString &r : m_restrictions)
49 if (r.startsWith(input))
62 if (input.
isEmpty()) {
return; }
CUpperCaseValidator(QObject *parent=nullptr)
Constructor.
void setAllowedCharacters09AZ()
Set the allowed characters as 0-9 and A-Z.
void fixup(QString &input) const
State validate(QString &input, int &pos) const
void setAllowedCharacters(const QString &chars)
Allowed characters.
Free functions in swift::misc.
QString removeIfNotInString(const QString &string, const QString &inString)
Remove if NOT in string.
bool isEmpty() const const
bool isEmpty() const const
qsizetype length() const const
QString toUpper() const const