cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
validatornotin.h
1/*
2 * SPDX-FileCopyrightText: (C) 2017-2023 Matthias Fehring <mf@huessenbergnetz.de>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef CUTELYSTVALIDATORNOTIN_H
6#define CUTELYSTVALIDATORNOTIN_H
7
8#include "validatorrule.h"
9
10#include <Cutelyst/cutelyst_global.h>
11
12#include <QStringList>
13
14namespace Cutelyst {
15
16class ValidatorNotInPrivate;
17
39class CUTELYST_PLUGIN_UTILS_VALIDATOR_EXPORT ValidatorNotIn : public ValidatorRule
40{
41public:
54 ValidatorNotIn(const QString &field,
55 const QVariant &values,
57 const ValidatorMessages &messages = ValidatorMessages(),
58 const QString &defValKey = QString());
59
63 ~ValidatorNotIn() override;
64
65protected:
72 ValidatorReturnType validate(Context *c, const ParamsMultiMap &params) const override;
73
77 QString genericValidationError(Context *c,
78 const QVariant &errorData = QVariant()) const override;
79
83 QString genericValidationDataError(Context *c, const QVariant &errorData) const override;
84
85private:
86 Q_DECLARE_PRIVATE(ValidatorNotIn) // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
87 Q_DISABLE_COPY(ValidatorNotIn)
88};
89
90} // namespace Cutelyst
91
92#endif // CUTELYSTVALIDATORNOTIN_H
The Cutelyst Context.
Definition context.h:42
Checks if the field value is not one from a list of values.
Base class for all validator rules.
The Cutelyst namespace holds all public Cutelyst API.
CaseSensitivity
Stores custom error messages and the input field label.
Contains the result of a single input parameter validation.