Add input restrictions in AccountFormDialog name edit.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <QDebug>
|
||||
#include <QToolButton>
|
||||
#include <QPushButton>
|
||||
#include <QRegExpValidator>
|
||||
|
||||
#include "event/EventCenter.h"
|
||||
#include "log/UserOperationLog.h"
|
||||
@@ -48,6 +49,7 @@ AccountFormDialog::AccountFormDialog(QWidget* parent, AccountEditMode mode, Qt::
|
||||
&AccountFormDialog::changeSelfPassword : &AccountFormDialog::resetUserPassword);
|
||||
}
|
||||
|
||||
mLeUserName->setValidator(new QRegExpValidator(QRegExp("^[A-Za-z0-9\u4e00-\u9fa5]+$")));
|
||||
connect(mLeComment, &QLineEdit::textChanged, [=](const QString& text) {
|
||||
mCommentChanged = true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user