Add input restrictions in AccountFormDialog name edit.

This commit is contained in:
sunwen
2024-05-07 14:02:46 +08:00
parent 1c96909b60
commit eb041549aa

View File

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