cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
validatormin.h
1/*
2 * SPDX-FileCopyrightText: (C) 2017-2023 Matthias Fehring <mf@huessenbergnetz.de>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef CUTELYSTVALIDATORMIN_H
6#define CUTELYSTVALIDATORMIN_H
7
8#include "validatorrule.h"
9
10#include <Cutelyst/cutelyst_global.h>
11
12namespace Cutelyst {
13
14class ValidatorMinPrivate;
15
48class CUTELYST_PLUGIN_UTILS_VALIDATOR_EXPORT ValidatorMin : public ValidatorRule
49{
50public:
62 ValidatorMin(const QString &field,
63 QMetaType::Type type,
64 const QVariant &min,
65 const ValidatorMessages &messages = ValidatorMessages(),
66 const QString &defValKey = QString());
67
71 ~ValidatorMin() override;
72
73protected:
80 ValidatorReturnType validate(Context *c, const ParamsMultiMap &params) const override;
81
85 QString genericValidationError(Context *c,
86 const QVariant &errorData = QVariant()) const override;
87
91 QString genericValidationDataError(Context *c, const QVariant &errorData) const override;
92
96 QString genericParsingError(Context *c, const QVariant &errorData) const override;
97
98private:
99 Q_DECLARE_PRIVATE(ValidatorMin) // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
100 Q_DISABLE_COPY(ValidatorMin)
101};
102
103} // namespace Cutelyst
104
105#endif // CUTELYSTVALIDATORMIN_H
The Cutelyst Context.
Definition context.h:42
Checks if a value is not smaller or shorter than a maximum value.
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.