6#include "validatoraccepted_p.h"
13const QStringList ValidatorAcceptedPrivate::trueVals{u
"yes"_s, u
"on"_s, u
"1"_s, u
"true"_s};
51 return c->
qtTrId(
"cutelyst-valaccepted-genvalerr");
55 return c->
qtTrId(
"cutelyst-valaccepted-genvalerr-label").
arg(_label);
QString qtTrId(const char *id, int n=-1) const
ValidatorAccepted(const QString &field, const ValidatorMessages &messages=ValidatorMessages())
QString genericValidationError(Context *c, const QVariant &errorData=QVariant()) const override
~ValidatorAccepted() override
QString field() const noexcept
QString validationError(Context *c, const QVariant &errorData={}) const
QString label(Context *c) const
ValidatorRule(const QString &field, const ValidatorMessages &messages={}, const QString &defValKey={}, QByteArrayView validatorName=nullptr)
QString value(const ParamsMultiMap ¶ms) const
QString debugString(Context *c) const
QMultiMap< QString, QString > ParamsMultiMap
static bool validate(const QString &value)
Returns true if the value is equal to yes, on, 1, or true.
The Cutelyst namespace holds all public Cutelyst API.
QString arg(Args &&... args) const const
bool isEmpty() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
void setValue(QVariant &&value)
Stores custom error messages and the input field label.
Contains the result of a single input parameter validation.