Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
ComputerNameValidator.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2021 Symless Ltd.
4 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
5 */
6
7#pragma once
8
9#include "IStringValidator.h"
10
11#include <QRegularExpression>
12
13namespace validators {
14
16{
17public:
18 explicit ComputerNameValidator(const QString &message);
19 bool validate(const QString &input) const override;
20
21private:
22 inline static const QRegularExpression m_nameValidator =
23 QRegularExpression(QStringLiteral("^[\\w\\._-]{0,255}$"), QRegularExpression::CaseInsensitiveOption);
24};
25
26} // namespace validators
bool validate(const QString &input) const override
Definition ComputerNameValidator.cpp:18
ComputerNameValidator(const QString &message)
Definition ComputerNameValidator.cpp:13
Definition AliasValidator.cpp:14