5 #ifndef CUTELYSTVALIDATOREMAIL_H 6 #define CUTELYSTVALIDATOREMAIL_H 8 #include "validatorrule.h" 10 #include <Cutelyst/cutelyst_global.h> 14 class ValidatorEmailPrivate;
84 RFC5321QuotedString = 11,
85 RFC5321AddressLiteral = 12,
86 RFC5321IPv6Deprecated =
94 DeprecatedLocalpart = 33,
98 DeprecatedComment = 37,
100 DeprecatedCFWSNearAt =
108 RFC5322LocalTooLong = 67,
109 RFC5322DomainTooLong = 68,
110 RFC5322LabelTooLong = 69,
111 RFC5322DomainLiteral =
114 RFC5322DomLitOBSDText = 71,
117 RFC5322IPv6GroupCount =
119 RFC5322IPv62x2xColon = 73,
120 RFC5322IPv6BadChar = 74,
121 RFC5322IPv6MaxGroups = 75,
122 RFC5322IPv6ColonStart = 76,
123 RFC5322IPv6ColonEnd = 77,
125 ErrorExpectingDText =
127 ErrorNoLocalPart = 130,
129 ErrorConsecutiveDots = 132,
130 ErrorATextAfterCFWS =
132 ErrorATextAfterQS = 134,
133 ErrorATextAfterDomLit =
135 ErrorExpectingQpair =
137 ErrorExpectingAText = 137,
138 ErrorExpectingQText = 138,
139 ErrorExpectingCText = 139,
140 ErrorBackslashEnd = 140,
143 ErrorDomainHyphenStart = 143,
144 ErrorDomainHyphenEnd = 144,
145 ErrorUnclosedQuotedStr = 145,
146 ErrorUnclosedComment = 146,
147 ErrorUnclosedDomLiteral = 147,
148 ErrorFWSCRLFx2 = 148,
149 ErrorFWSCRLFEnd = 149,
162 AllowUTF8 = UTF8Local | AllowIDN
165 Q_DECLARE_FLAGS(Options, Option)
176 Category threshold = RFC5321,
177 Options options = NoOption,
209 static Category category(Diagnose diagnose);
230 static bool validate(
const QString &email,
231 Category threshold = RFC5321,
232 Options options = NoOption,
259 Q_DECLARE_OPERATORS_FOR_FLAGS(Cutelyst::ValidatorEmail::Options)
261 #endif // CUTELYSTVALIDATOREMAIL_H Stores custom error messages and the input field label.
Checks if the value is a valid email address according to specific RFCs.
The Cutelyst namespace holds all public Cutelyst API.
Base class for all validator rules.
Category
Validation category, used as threshold to define valid addresses.
Contains the result of a single input parameter validation.
Diagnose
Single diagnose values that show why an address is not valid.