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);
QString qtTrId(const char *id, int n=-1) const
ValidatorReturnType validate(Context *c, const ParamsMultiMap ¶ms) const override
QString genericValidationError(Context *c, const QVariant &errorData=QVariant()) const override
ValidatorNumeric(const QString &field, const ValidatorMessages &messages=ValidatorMessages(), const QString &defValKey=QString())
~ValidatorNumeric() override
Base class for all validator rules.
QString validationError(Context *c, const QVariant &errorData={}) const
QString label(Context *c) const
void defaultValue(Context *c, ValidatorReturnType *result) const
QString value(const ParamsMultiMap ¶ms) const
QString debugString(Context *c) const
The Cutelyst namespace holds all public Cutelyst API.
QString arg(Args &&... args) const const
bool isEmpty() const const
double toDouble(bool *ok) const const
void setValue(QVariant &&value)
Stores custom error messages and the input field label.
Contains the result of a single input parameter validation.