6 #ifndef CUTELYSTVALIDATORDOMAIN_H 7 #define CUTELYSTVALIDATORDOMAIN_H 9 #include "validatorrule.h" 13 class ValidatorDomainPrivate;
77 CheckDNS = CheckARecord | CheckAAAARecord
80 Q_DECLARE_FLAGS(Options, Option)
93 Options options = NoOption,
100 ~ValidatorDomain()
override;
114 static bool validate(
const QString &value,
115 Diagnose *diagnose =
nullptr,
116 QString *extractedValue =
nullptr);
128 validateCb(
const QString &value,
130 std::function<
void(Diagnose diagnose,
const QString &extractedValue)> cb);
140 static QString diagnoseString(
const Context *c, Diagnose diagnose,
const QString &label = {});
149 ValidatorReturnType validate(Context *c,
const ParamsMultiMap ¶ms)
const override;
160 void validateCb(Context *c,
const ParamsMultiMap ¶ms, ValidatorRtFn cb)
const override;
167 QString genericValidationError(Context *c,
171 Q_DECLARE_PRIVATE(ValidatorDomain)
172 Q_DISABLE_COPY(ValidatorDomain)
177 Q_DECLARE_OPERATORS_FOR_FLAGS(Cutelyst::ValidatorDomain::Options);
179 #endif // CUTELYSTVALIDATORDOMAIN_H Checks if the value of the input field contains a FQDN according to RFC 1035.
Stores custom error messages and the input field label.
The Cutelyst namespace holds all public Cutelyst API.
Base class for all validator rules.
Diagnose
Possible diagnose information for the checked domain.
QMultiMap< QString, QString > ParamsMultiMap
Option
Options for the domain validation.