/* 工具类 */
|
//提供各种检测输入或者输出的有效性的函数
|
|
#ifndef TEXTVALIDATOR_H
|
#define TEXTVALIDATOR_H
|
|
/* 自定义头文件 */
|
|
/* 系统头文键 */
|
#include <QString>
|
#include <QRegularExpression>
|
#include <QRegularExpressionMatch>
|
|
class TextValidator
|
{
|
public:
|
TextValidator();
|
~TextValidator();
|
|
/* 辅助函数 */
|
static bool isValidUsername(const QString username);
|
static bool isValidPassword(const QString password);
|
static bool isValidEmail(const QString email);
|
static bool isValidTelephone(const QString telephone);
|
|
};
|
|
#endif // TEXTVALIDATOR_H
|