cutelyst
3.9.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
Cutelyst
Plugins
Utils
Validator
validatorrequiredunlessstash.h
1
/*
2
* SPDX-FileCopyrightText: (C) 2018-2022 Matthias Fehring <mf@huessenbergnetz.de>
3
* SPDX-License-Identifier: BSD-3-Clause
4
*/
5
6
#ifndef CUTELYSTVALIDATORREQUIREDUNLESSSTASH_H
7
#define CUTELYSTVALIDATORREQUIREDUNLESSSTASH_H
8
9
#include "validatorrule.h"
10
11
#include <Cutelyst/cutelyst_global.h>
12
13
namespace
Cutelyst
{
14
15
class
ValidatorRequiredUnlessStashPrivate;
16
39
class
CUTELYST_PLUGIN_UTILS_VALIDATOR_EXPORT
ValidatorRequiredUnlessStash
:
public
ValidatorRule
40
{
41
public
:
50
ValidatorRequiredUnlessStash
(
const
QString
&field,
51
const
QString
&stashKey,
52
const
QVariantList &stashValues,
53
const
ValidatorMessages
&messages =
ValidatorMessages
());
54
58
~ValidatorRequiredUnlessStash
()
override
;
59
60
protected
:
67
ValidatorReturnType
validate(
Context
*c,
const
ParamsMultiMap
¶ms)
const override
;
68
72
QString
genericValidationError(
Context
*c,
73
const
QVariant
&errorData =
QVariant
())
const override
;
74
75
private
:
76
Q_DECLARE_PRIVATE(
ValidatorRequiredUnlessStash
)
77
Q_DISABLE_COPY(
ValidatorRequiredUnlessStash
)
78
};
79
80
}
// namespace Cutelyst
81
82
#endif
// CUTELYSTVALIDATORREQUIREDUNLESSSTASH_H
Cutelyst::Context
The Cutelyst Context.
Definition
context.h:39
Cutelyst::ValidatorRequiredUnlessStash
<Cutelyst/Plugins/Utils/validatorrequiredunlessstash.h>
Definition
validatorrequiredunlessstash.h:40
Cutelyst::ValidatorRule
Base class for all validator rules.
Definition
validatorrule.h:293
Cutelyst
The Cutelyst namespace holds all public Cutelyst API.
Definition
Mainpage.dox:8
QMultiMap
QString
QVariant
Cutelyst::ValidatorMessages
Stores custom error messages and the input field label.
Definition
validatorrule.h:135
Cutelyst::ValidatorReturnType
Contains the result of a single input parameter validation.
Definition
validatorrule.h:49
Generated on Fri May 16 2025 00:00:00 for cutelyst by
1.10.0