6 #include "validatornumeric_p.h" 13 :
ValidatorRule(*new ValidatorNumericPrivate(field, messages, defValKey))
31 qCDebug(C_VALIDATOR).noquote().nospace()
32 <<
debugString(c) <<
" Can not convert input value \"" << v
33 <<
"\" into a numeric value";
49 return c->
qtTrId(
"cutelyst-valnumeric-genvalerr");
53 return c->
qtTrId(
"cutelyst-valnumeric-genvalerr-label").
arg(_label);
~ValidatorNumeric() override
Stores custom error messages and the input field label.
ValidatorNumeric(const QString &field, const ValidatorMessages &messages=ValidatorMessages(), const QString &defValKey=QString())
double toDouble(bool *ok) const const
void defaultValue(Context *c, ValidatorReturnType *result) const
bool isEmpty() const const
QString genericValidationError(Context *c, const QVariant &errorData=QVariant()) const override
The Cutelyst namespace holds all public Cutelyst API.
Base class for all validator rules.
QString label(Context *c) const
QString value(const ParamsMultiMap ¶ms) const
QString validationError(Context *c, const QVariant &errorData={}) const
QString qtTrId(const char *id, int n=-1) const
ValidatorReturnType validate(Context *c, const ParamsMultiMap ¶ms) const override
Contains the result of a single input parameter validation.
QString arg(Args &&... args) const const
QString debugString(Context *c) const
void setValue(QVariant &&value)