6#include "validatorconfirmed_p.h"
11 :
ValidatorRule(*new ValidatorConfirmedPrivate(field, messages))
31 if (Q_UNLIKELY(v != ofv)) {
33 qCDebug(C_VALIDATOR).noquote().nospace()
34 <<
debugString(c) <<
" The value in \"" << ofn <<
"\" does not fit: \"" << v
35 <<
"\" != \"" << ofv <<
"\"";
57 return c->
qtTrId(
"cutelyst-valconfirmed-genvalerr");
61 return c->
qtTrId(
"cutelyst-valconfirmed-genvalerr-label").
arg(_label);
QString qtTrId(const char *id, int n=-1) const
void validateCb(Context *c, const ParamsMultiMap ¶ms, ValidatorRtFn cb) const override
ValidatorConfirmed(const QString &field, const ValidatorMessages &messages={})
QString genericValidationError(Context *c, const QVariant &errorData=QVariant()) const override
~ValidatorConfirmed() override
ValidatorReturnType validate(Context *c, const ParamsMultiMap ¶ms) const override
Base class for all validator rules.
QString field() const noexcept
QString validationError(Context *c, const QVariant &errorData={}) const
QString label(const Context *c) const
bool trimBefore() const noexcept
QString debugString(const Context *c) const
std::function< void(ValidatorReturnType &&result)> ValidatorRtFn
Void callback function for validator rules that processes the ValidatorReturnType.
QString value(const ParamsMultiMap ¶ms) const
The Cutelyst namespace holds all public Cutelyst API.
T value(const Key &key, const T &defaultValue) const const
QString arg(Args &&... args) const const
bool isEmpty() const const
QString trimmed() const const
void setValue(QVariant &&value)
Stores custom error messages and the input field label.
Contains the result of a single input parameter validation.