5#ifndef CUTELYSTVALIDATORREQUIREDIFSTASH_H
6#define CUTELYSTVALIDATORREQUIREDIFSTASH_H
8#include "validatorrule.h"
10#include <Cutelyst/cutelyst_global.h>
14class ValidatorRequiredIfStashPrivate;
51 const QVariantList &stashValues,
ValidatorRequiredIfStash(const QString &field, const QString &stashKey, const QVariantList &stashValues, const ValidatorMessages &messages=ValidatorMessages())
Constructs a new required if stash validator.
QString genericValidationError(Context *c, const QVariant &errorData=QVariant()) const override
Returns a generic error message if validation failed.
ValidatorReturnType validate(Context *c, const ParamsMultiMap ¶ms) const override
Performs the validation and returns the result.
QString field() const
Returns the name of the field to validate.
ValidatorRule(const QString &field, const ValidatorMessages &messages=ValidatorMessages(), const QString &defValKey=QString())
Constructs a new ValidatorRule with the given parameters.
The Cutelyst namespace holds all public Cutelyst API.
QMultiMap< QString, QString > ParamsMultiMap
Stores custom error messages and the input field label.
Contains the result of a single input parameter validation.