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 <<
"\"";
51 return c->
qtTrId(
"cutelyst-valconfirmed-genvalerr");
55 return c->
qtTrId(
"cutelyst-valconfirmed-genvalerr-label").
arg(_label);
QString qtTrId(const char *id, int n=-1) const
QString genericValidationError(Context *c, const QVariant &errorData=QVariant()) const override
~ValidatorConfirmed() override
ValidatorConfirmed(const QString &field, const ValidatorMessages &messages=ValidatorMessages())
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(Context *c) const
bool trimBefore() const noexcept
QString value(const ParamsMultiMap ¶ms) const
QString debugString(Context *c) 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.