3#include <QRegularExpression>
16 void setRule(
const QString &key,
Tf::ValidationRule rule,
bool enable =
true,
const QString &errorMessage = QString());
17 void setRule(
const QString &key,
Tf::ValidationRule rule,
const QString &errorMessage);
19 void setRule(
const QString &key,
Tf::ValidationRule rule,
float val,
const QString &errorMessage = QString());
20 void setRule(
const QString &key,
Tf::ValidationRule rule,
double val,
const QString &errorMessage = QString());
21 void setRule(
const QString &key,
Tf::ValidationRule rule,
int val,
const QString &errorMessage = QString());
22 void setRule(
const QString &key,
Tf::ValidationRule rule, int64_t val,
const QString &errorMessage = QString());
23 void setPatternRule(
const QString &key,
const QRegularExpression &rx,
const QString &errorMessage = QString());
26 void setDateFormat(
const QString &format);
27 QString dateFormat()
const;
28 void setTimeFormat(
const QString &format);
29 QString timeFormat()
const;
30 void setDateTimeFormat(
const QString &format);
31 QString dateTimeFormat()
const;
33 virtual bool validate(
const QVariantMap &map);
34 bool hasValidationError()
const;
35 bool isValidationError(
const QString &key)
const;
36 QStringList validationErrorKeys()
const;
37 QString errorMessage(
const QString &key)
const;
38 QStringList errorMessages()
const;
39 QString value(
const QString &key,
const QString &defaultValue = QString())
const;
41 void setValidationError(
const QString &key,
const QString &errorMessage);
51 RuleEntry(
const QString &key,
int rule,
bool enable,
const QString &errorMessage);
52 RuleEntry(
const QString &key,
int rule, int64_t val,
const QString &errorMessage);
53 RuleEntry(
const QString &key,
int rule,
double val,
const QString &errorMessage);
54 RuleEntry(
const QString &key,
int rule,
const QRegularExpression &rx,
const QString &errorMessage);
The RuleEntry class is for internal use only.
Definition tformvalidator.h:44
QVariant value
Definition tformvalidator.h:48
QString key
Definition tformvalidator.h:46
QString message
Definition tformvalidator.h:49
int rule
Definition tformvalidator.h:47
ValidationRule
Definition tfnamespace.h:107
#define T_CORE_EXPORT
Definition tdeclexport.h:28