You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
404 B
19 lines
404 B
|
|
#include "CodeValidator.h"
|
|
|
|
|
|
CodeValidator::CodeValidator(QObject * parent, const char * name)
|
|
: QRegExpValidator(QRegExp("\\d{1,10}[A-Za-z]"), parent, name) {
|
|
};
|
|
|
|
QValidator::State CodeValidator::validate(QString & input, int & pos) {
|
|
QValidator::State st = QRegExpValidator::validate(input, pos);
|
|
|
|
if (st != QValidator::Invalid) {
|
|
unsigned int sl = input.length();
|
|
|
|
}
|
|
|
|
return st;
|
|
|
|
}
|
|
|