cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
validatorafter.h
1/*
2 * SPDX-FileCopyrightText: (C) 2017-2023 Matthias Fehring <mf@huessenbergnetz.de>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef CUTELYSTVALIDATORAFTER_H
6#define CUTELYSTVALIDATORAFTER_H
7
8#include "validatorrule.h"
9
10#include <Cutelyst/cutelyst_global.h>
11
12namespace Cutelyst {
13
14class ValidatorAfterPrivate;
15
96class CUTELYST_PLUGIN_UTILS_VALIDATOR_EXPORT ValidatorAfter : public ValidatorRule
97{
98public:
110 ValidatorAfter(const QString &field,
111 const QVariant &comparison,
112 const QString &timeZone = QString(),
113 const char *inputFormat = nullptr,
114 const ValidatorMessages &messages = ValidatorMessages(),
115 const QString &defValKey = QString());
116
120 ~ValidatorAfter() override;
121
122protected:
130 ValidatorReturnType validate(Context *c, const ParamsMultiMap &params) const override;
131
135 QString genericValidationError(Context *c,
136 const QVariant &errorData = QVariant()) const override;
137
141 QString genericValidationDataError(Context *c,
142 const QVariant &errorData = QVariant()) const override;
143
147 QString genericParsingError(Context *c, const QVariant &errorData = QVariant()) const override;
148
149private:
150 Q_DECLARE_PRIVATE(ValidatorAfter) // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
151 Q_DISABLE_COPY(ValidatorAfter)
152};
153
154} // namespace Cutelyst
155
156#endif // CUTELYSTVALIDATORAFTER_H
The Cutelyst Context.
Definition context.h:42
Checks if a date, time or datetime is after a comparison 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.