cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
validatorconfirmed.h
1/*
2 * SPDX-FileCopyrightText: (C) 2017-2023 Matthias Fehring <mf@huessenbergnetz.de>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef CUTELYSTVALIDATORCONFIRMED_H
6#define CUTELYSTVALIDATORCONFIRMED_H
7
8#include "validatorrule.h"
9
10#include <Cutelyst/cutelyst_global.h>
11
12namespace Cutelyst {
13
14class ValidatorConfirmedPrivate;
15
39class CUTELYST_PLUGIN_UTILS_VALIDATOR_EXPORT ValidatorConfirmed : public ValidatorRule
40{
41public:
48 ValidatorConfirmed(const QString &field,
49 const ValidatorMessages &messages = ValidatorMessages());
50
55
56protected:
63 ValidatorReturnType validate(Context *c, const ParamsMultiMap &params) const override;
64
68 QString genericValidationError(Context *c,
69 const QVariant &errorData = QVariant()) const override;
70
71private:
72 Q_DECLARE_PRIVATE(ValidatorConfirmed) // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
73 Q_DISABLE_COPY(ValidatorConfirmed)
74};
75
76} // namespace Cutelyst
77
78#endif // CUTELYSTVALIDATORCONFIRMED_H
The Cutelyst Context.
Definition context.h:42
Checks for a confirmation input field.
Base class for all validator rules.
The Cutelyst namespace holds all public Cutelyst API.
Stores custom error messages and the input field label.
Contains the result of a single input parameter validation.