cutelyst
4.5.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
|
Base class for all validator rules. More...
#include <Cutelyst/Plugins/Utils/ValidatorRule>
Public Member Functions | |
ValidatorRule (const QString &field, const ValidatorMessages &messages={}, const QString &defValKey={}, QByteArrayView validatorName=nullptr) | |
virtual | ~ValidatorRule () |
Deconstructs the ValidatorRule. | |
Protected Member Functions | |
ValidatorRule (ValidatorRulePrivate &dd) | |
QString | debugString (Context *c) const |
void | defaultValue (Context *c, ValidatorReturnType *result) const |
QString | field () const noexcept |
virtual QString | genericParsingError (Context *c, const QVariant &errorData={}) const |
virtual QString | genericValidationDataError (Context *c, const QVariant &errorData={}) const |
virtual QString | genericValidationError (Context *c, const QVariant &errorData={}) const |
QString | label (Context *c) const |
QString | parsingError (Context *c, const QVariant &errorData={}) const |
bool | trimBefore () const noexcept |
virtual ValidatorReturnType | validate (Context *c, const ParamsMultiMap ¶ms) const =0 |
QString | validationDataError (Context *c, const QVariant &errorData={}) const |
QString | validationError (Context *c, const QVariant &errorData={}) const |
QString | value (const ParamsMultiMap ¶ms) const |
Friends | |
class | Validator |
class | ValidatorPrivate |
This class can not be used on it’s own, you have to create a derived class from it that implements your validator logic. Or use one of the already existing validator rules.
If you want to implement your own validator logic to use with Validator, you have to create a class that derives from ValidatorRule. The simplest implementation only needs a constructor and a reimplementation of the validate() function. But for more comfort and usability, you should also reimplement genericValidationError(). If your validator parses the input into a specific type to validate it and/or if you are using additional parameters, you may also want to reimplement genericParsingError() and genericValidationDataError() to return more appropriate generic error messages.
The most important parameter for every validator rule is the name of the field to validate. So your own validator should require that field in the constructor. For better error messages you should also add an optional paramter to set custom ValidatorMessages if validation fails.
In the validation logic implemented in the validate() function you have to return a ValidatorReturnType struct that contains information about the validation. It has three members, errorMessages is the most important one. If that returns true
for QString::isNull(), the validation has succeeded.
So lets implement a custom validator that can check for a specific value to be set. (Maybe not a realistic example, but it should be enough for demonstration.)
That's it. Now you can use your own validator rule in the main Validator.
Definition at line 303 of file validatorrule.h.
ValidatorRule::ValidatorRule | ( | const QString & | field, |
const ValidatorMessages & | messages = {} , |
||
const QString & | defValKey = {} , |
||
QByteArrayView | validatorName = nullptr |
||
) |
Constructs a new ValidatorRule object with the given parameters.
field | Name of the field to validate. |
messages | Custom error messages if validation fails. |
defValKey | Stash key containing a default value if input field is empty. This value will NOT be validated. |
vaidatorName | Name of the validator used for debug output. |
Definition at line 13 of file validatorrule.cpp.
|
protected |
Constructs a new ValidatorRule object with the given private class.
Definition at line 21 of file validatorrule.cpp.
Returns a string that can be used for debug output if validation fails.
This returns something like MyValidator: Validation failed for field "my_field" at MyController::myAction:
Definition at line 157 of file validatorrule.cpp.
References Cutelyst::Context::actionName, Cutelyst::Context::controllerName, field(), and QString::fromLatin1().
Referenced by Cutelyst::ValidatorAccepted::validate(), Cutelyst::ValidatorAfter::validate(), Cutelyst::ValidatorAlpha::validate(), Cutelyst::ValidatorAlphaDash::validate(), Cutelyst::ValidatorAlphaNum::validate(), Cutelyst::ValidatorBefore::validate(), Cutelyst::ValidatorBetween::validate(), Cutelyst::ValidatorBoolean::validate(), Cutelyst::ValidatorCharNotAllowed::validate(), Cutelyst::ValidatorConfirmed::validate(), Cutelyst::ValidatorDate::validate(), Cutelyst::ValidatorDateTime::validate(), Cutelyst::ValidatorDifferent::validate(), Cutelyst::ValidatorDigits::validate(), Cutelyst::ValidatorDigitsBetween::validate(), Cutelyst::ValidatorDomain::validate(), Cutelyst::ValidatorFileSize::validate(), Cutelyst::ValidatorFilled::validate(), Cutelyst::ValidatorIn::validate(), Cutelyst::ValidatorInteger::validate(), Cutelyst::ValidatorJson::validate(), Cutelyst::ValidatorMax::validate(), Cutelyst::ValidatorMin::validate(), Cutelyst::ValidatorNotIn::validate(), Cutelyst::ValidatorNumeric::validate(), Cutelyst::ValidatorPresent::validate(), Cutelyst::ValidatorPwQuality::validate(), Cutelyst::ValidatorRegularExpression::validate(), Cutelyst::ValidatorRequired::validate(), Cutelyst::ValidatorRequiredIf::validate(), Cutelyst::ValidatorRequiredIfStash::validate(), Cutelyst::ValidatorRequiredUnless::validate(), Cutelyst::ValidatorRequiredUnlessStash::validate(), Cutelyst::ValidatorRequiredWith::validate(), Cutelyst::ValidatorRequiredWithAll::validate(), Cutelyst::ValidatorRequiredWithout::validate(), Cutelyst::ValidatorRequiredWithoutAll::validate(), Cutelyst::ValidatorSame::validate(), Cutelyst::ValidatorSize::validate(), Cutelyst::ValidatorTime::validate(), and Cutelyst::ValidatorUrl::validate().
|
protected |
If a defValKey has been set in the constructor, this will try to get the default value from the stash of context c and put it into the result.
Definition at line 144 of file validatorrule.cpp.
References Cutelyst::Context::actionName, Cutelyst::Context::controllerName, field(), QVariant::setValue(), Cutelyst::Context::stash(), and Cutelyst::ValidatorReturnType::value.
Referenced by Cutelyst::ValidatorAfter::validate(), Cutelyst::ValidatorAlpha::validate(), Cutelyst::ValidatorAlphaDash::validate(), Cutelyst::ValidatorAlphaNum::validate(), Cutelyst::ValidatorBefore::validate(), Cutelyst::ValidatorBetween::validate(), Cutelyst::ValidatorBoolean::validate(), Cutelyst::ValidatorCharNotAllowed::validate(), Cutelyst::ValidatorDate::validate(), Cutelyst::ValidatorDateTime::validate(), Cutelyst::ValidatorDigits::validate(), Cutelyst::ValidatorDigitsBetween::validate(), Cutelyst::ValidatorDomain::validate(), Cutelyst::ValidatorEmail::validate(), Cutelyst::ValidatorFileSize::validate(), Cutelyst::ValidatorFilled::validate(), Cutelyst::ValidatorIn::validate(), Cutelyst::ValidatorInteger::validate(), Cutelyst::ValidatorIp::validate(), Cutelyst::ValidatorJson::validate(), Cutelyst::ValidatorMax::validate(), Cutelyst::ValidatorMin::validate(), Cutelyst::ValidatorNotIn::validate(), Cutelyst::ValidatorNumeric::validate(), Cutelyst::ValidatorRegularExpression::validate(), Cutelyst::ValidatorSame::validate(), Cutelyst::ValidatorSize::validate(), Cutelyst::ValidatorTime::validate(), and Cutelyst::ValidatorUrl::validate().
|
protectednoexcept |
Returns the name of the field to validate.
Definition at line 28 of file validatorrule.cpp.
Referenced by debugString(), defaultValue(), Cutelyst::ValidatorSize::genericValidationDataError(), Cutelyst::Validator::validate(), Cutelyst::ValidatorConfirmed::validate(), Cutelyst::ValidatorFilled::validate(), Cutelyst::ValidatorPresent::validate(), and Cutelyst::ValidatorRequired::validate().
|
protectedvirtual |
Returns a generic error message if an error occures while parsing input.
If you want to have a more specific generic parsing error message for your validator if parsing of input data failes, reimplement this in your derived class. The default implementation simply returns a maybe translated version of "The input data in the “%1“
field could not be parsed."
if there has been a label set or "The
input data could not be parsed."
if the label is empty.
The pointer to the current Context c can be used to translate error strings. If you have some more data to use for the error messages, put them into errorData.
Reimplemented in Cutelyst::ValidatorBefore, Cutelyst::ValidatorAfter, Cutelyst::ValidatorSize, Cutelyst::ValidatorMin, Cutelyst::ValidatorMax, and Cutelyst::ValidatorBetween.
Definition at line 102 of file validatorrule.cpp.
References QString::arg(), QString::isEmpty(), label(), and Cutelyst::Context::qtTrId().
Referenced by parsingError().
|
protectedvirtual |
Returns a generic error message if any validation data is missing or invalid.
If you want to have a more specific generic validation data error message for your validator if data needed for the validation is missing or invalid, reimplement this in your derived class. The default implementation simply returns a maybe translated version of "Missing or
invalid validation data for the “%1” field."
if there has been a label set or "Missing or invalid validation data."
if the label is empty.
The pointer to the current Context c can be used to translate error strings. If you have some more data to use for the error messages, put them into errorData.
Reimplemented in Cutelyst::ValidatorCharNotAllowed, Cutelyst::ValidatorBefore, Cutelyst::ValidatorAfter, Cutelyst::ValidatorSize, Cutelyst::ValidatorNotIn, Cutelyst::ValidatorMin, Cutelyst::ValidatorMax, Cutelyst::ValidatorIn, Cutelyst::ValidatorFileSize, and Cutelyst::ValidatorBetween.
Definition at line 130 of file validatorrule.cpp.
References QString::arg(), QString::isEmpty(), label(), and Cutelyst::Context::qtTrId().
Referenced by validationDataError().
|
protectedvirtual |
Returns a generic error mesage if validation failed.
If you want to have a more specifc generic validation error message for your validator if validation fails, reimplment this in your derived class. The default implementation simply returns a maybe translated version of "The input data in the “%1” field is not
acceptable."
if there has been a label set or "The input data is not
acceptable."
if the label is empty.
The pointer to the current Context c can be used to translate error strings. If you have some more data to use for the error messages, put them into errorData.
Reimplemented in Cutelyst::ValidatorUrl, Cutelyst::ValidatorTime, Cutelyst::ValidatorSize, Cutelyst::ValidatorSame, Cutelyst::ValidatorRequiredWithoutAll, Cutelyst::ValidatorRequiredWithout, Cutelyst::ValidatorRequiredWithAll, Cutelyst::ValidatorRequiredWith, Cutelyst::ValidatorRequiredUnlessStash, Cutelyst::ValidatorRequiredUnless, Cutelyst::ValidatorRequiredIfStash, Cutelyst::ValidatorRequiredIf, Cutelyst::ValidatorRequired, Cutelyst::ValidatorRegularExpression, Cutelyst::ValidatorPresent, Cutelyst::ValidatorNumeric, Cutelyst::ValidatorNotIn, Cutelyst::ValidatorMin, Cutelyst::ValidatorMax, Cutelyst::ValidatorJson, Cutelyst::ValidatorIp, Cutelyst::ValidatorInteger, Cutelyst::ValidatorIn, Cutelyst::ValidatorFilled, Cutelyst::ValidatorFileSize, Cutelyst::ValidatorEmail, Cutelyst::ValidatorDomain, Cutelyst::ValidatorDigitsBetween, Cutelyst::ValidatorDigits, Cutelyst::ValidatorDifferent, Cutelyst::ValidatorDateTime, Cutelyst::ValidatorDate, Cutelyst::ValidatorConfirmed, Cutelyst::ValidatorCharNotAllowed, Cutelyst::ValidatorBoolean, Cutelyst::ValidatorBetween, Cutelyst::ValidatorBefore, Cutelyst::ValidatorAlphaNum, Cutelyst::ValidatorAlphaDash, Cutelyst::ValidatorAlpha, Cutelyst::ValidatorAfter, Cutelyst::ValidatorAccepted, and Cutelyst::ValidatorPwQuality.
Definition at line 75 of file validatorrule.cpp.
References QString::arg(), QString::isEmpty(), label(), and Cutelyst::Context::qtTrId().
Referenced by validationError().
Returns the human readable field label used for generic error messages. The label can be set in the ValidatorMessages on the constructor.
Definition at line 49 of file validatorrule.cpp.
References Cutelyst::Context::qtTrId(), and Cutelyst::Context::translate().
Referenced by Cutelyst::ValidatorEmail::categoryString(), Cutelyst::ValidatorDomain::diagnoseString(), Cutelyst::ValidatorEmail::diagnoseString(), Cutelyst::ValidatorPwQuality::errorString(), Cutelyst::ValidatorBetween::genericParsingError(), Cutelyst::ValidatorMax::genericParsingError(), Cutelyst::ValidatorMin::genericParsingError(), Cutelyst::ValidatorSize::genericParsingError(), Cutelyst::ValidatorAfter::genericParsingError(), Cutelyst::ValidatorBefore::genericParsingError(), genericParsingError(), Cutelyst::ValidatorBetween::genericValidationDataError(), Cutelyst::ValidatorFileSize::genericValidationDataError(), Cutelyst::ValidatorIn::genericValidationDataError(), Cutelyst::ValidatorMax::genericValidationDataError(), Cutelyst::ValidatorMin::genericValidationDataError(), Cutelyst::ValidatorNotIn::genericValidationDataError(), Cutelyst::ValidatorSize::genericValidationDataError(), Cutelyst::ValidatorAfter::genericValidationDataError(), Cutelyst::ValidatorBefore::genericValidationDataError(), Cutelyst::ValidatorCharNotAllowed::genericValidationDataError(), genericValidationDataError(), Cutelyst::ValidatorPwQuality::genericValidationError(), Cutelyst::ValidatorAccepted::genericValidationError(), Cutelyst::ValidatorAfter::genericValidationError(), Cutelyst::ValidatorAlpha::genericValidationError(), Cutelyst::ValidatorAlphaDash::genericValidationError(), Cutelyst::ValidatorAlphaNum::genericValidationError(), Cutelyst::ValidatorBefore::genericValidationError(), Cutelyst::ValidatorBetween::genericValidationError(), Cutelyst::ValidatorBoolean::genericValidationError(), Cutelyst::ValidatorCharNotAllowed::genericValidationError(), Cutelyst::ValidatorConfirmed::genericValidationError(), Cutelyst::ValidatorDate::genericValidationError(), Cutelyst::ValidatorDateTime::genericValidationError(), Cutelyst::ValidatorDifferent::genericValidationError(), Cutelyst::ValidatorDigits::genericValidationError(), Cutelyst::ValidatorDigitsBetween::genericValidationError(), Cutelyst::ValidatorDomain::genericValidationError(), Cutelyst::ValidatorEmail::genericValidationError(), Cutelyst::ValidatorFileSize::genericValidationError(), Cutelyst::ValidatorFilled::genericValidationError(), Cutelyst::ValidatorIn::genericValidationError(), Cutelyst::ValidatorInteger::genericValidationError(), Cutelyst::ValidatorIp::genericValidationError(), Cutelyst::ValidatorJson::genericValidationError(), Cutelyst::ValidatorMax::genericValidationError(), Cutelyst::ValidatorMin::genericValidationError(), Cutelyst::ValidatorNotIn::genericValidationError(), Cutelyst::ValidatorNumeric::genericValidationError(), Cutelyst::ValidatorPresent::genericValidationError(), Cutelyst::ValidatorRegularExpression::genericValidationError(), Cutelyst::ValidatorRequired::genericValidationError(), Cutelyst::ValidatorRequiredIf::genericValidationError(), Cutelyst::ValidatorRequiredIfStash::genericValidationError(), Cutelyst::ValidatorRequiredUnless::genericValidationError(), Cutelyst::ValidatorRequiredUnlessStash::genericValidationError(), Cutelyst::ValidatorRequiredWith::genericValidationError(), Cutelyst::ValidatorRequiredWithAll::genericValidationError(), Cutelyst::ValidatorRequiredWithout::genericValidationError(), Cutelyst::ValidatorRequiredWithoutAll::genericValidationError(), Cutelyst::ValidatorSame::genericValidationError(), Cutelyst::ValidatorSize::genericValidationError(), Cutelyst::ValidatorTime::genericValidationError(), Cutelyst::ValidatorUrl::genericValidationError(), and genericValidationError().
|
protected |
Returns an error message if an error occurred while parsing input.
This will either return the customParsingError message provided via the ValidatorMessages in the messages argument of the constructor or the message returned by genericValidationError() if there is no customParsingError message availabe.
When writing a new ValidatorRule, use this in your reimplementation of validate() if parsing of input data fails.
The pointer to the current Context c will be used to translate error strings. If you have some more data to use for the error messages, put them into errorData.
Definition at line 89 of file validatorrule.cpp.
References genericParsingError(), Cutelyst::Context::qtTrId(), and Cutelyst::Context::translate().
Referenced by Cutelyst::ValidatorAfter::validate(), Cutelyst::ValidatorBefore::validate(), Cutelyst::ValidatorBetween::validate(), Cutelyst::ValidatorMax::validate(), Cutelyst::ValidatorMin::validate(), and Cutelyst::ValidatorSize::validate().
|
protectednoexcept |
Returns true
if the field value should be trimmed before validation.
By default, this will return true
and all input values will be trimmed before validation to remove whitespaces from the beginning and the end.
Definition at line 165 of file validatorrule.cpp.
Referenced by Cutelyst::ValidatorConfirmed::validate(), Cutelyst::ValidatorDifferent::validate(), Cutelyst::ValidatorRequiredIf::validate(), Cutelyst::ValidatorRequiredUnless::validate(), and Cutelyst::ValidatorSame::validate().
|
protectedpure virtual |
Starts the validation and returns the result.
This is the main function to reimplement when writing a custom validator. When reimplementing this function in a class derived from ValidatorRule, you have to return an empty errorMessage if validation succeeded and the corresponding error if it fails. There are currently three error functions that should be used for different error cases:
If validation succeeded, you should put the extracted and validated value into the ValidatorReturnType::value. After the validation you can get the extracted values from ValidatorResult::values().
Implemented in Cutelyst::ValidatorUrl, Cutelyst::ValidatorTime, Cutelyst::ValidatorSize, Cutelyst::ValidatorSame, Cutelyst::ValidatorRequiredWithoutAll, Cutelyst::ValidatorRequiredWithout, Cutelyst::ValidatorRequiredWithAll, Cutelyst::ValidatorRequiredWith, Cutelyst::ValidatorRequiredUnlessStash, Cutelyst::ValidatorRequiredUnless, Cutelyst::ValidatorRequiredIfStash, Cutelyst::ValidatorRequiredIf, Cutelyst::ValidatorRequired, Cutelyst::ValidatorRegularExpression, Cutelyst::ValidatorPwQuality, Cutelyst::ValidatorPresent, Cutelyst::ValidatorNumeric, Cutelyst::ValidatorNotIn, Cutelyst::ValidatorMin, Cutelyst::ValidatorMax, Cutelyst::ValidatorJson, Cutelyst::ValidatorIp, Cutelyst::ValidatorInteger, Cutelyst::ValidatorIn, Cutelyst::ValidatorFilled, Cutelyst::ValidatorFileSize, Cutelyst::ValidatorEmail, Cutelyst::ValidatorDomain, Cutelyst::ValidatorDigitsBetween, Cutelyst::ValidatorDigits, Cutelyst::ValidatorDifferent, Cutelyst::ValidatorDateTime, Cutelyst::ValidatorDate, Cutelyst::ValidatorConfirmed, Cutelyst::ValidatorCharNotAllowed, Cutelyst::ValidatorBoolean, Cutelyst::ValidatorBetween, Cutelyst::ValidatorBefore, Cutelyst::ValidatorAlphaNum, Cutelyst::ValidatorAlphaDash, Cutelyst::ValidatorAlpha, Cutelyst::ValidatorAfter, and Cutelyst::ValidatorAccepted.
Referenced by Cutelyst::Validator::validate().
|
protected |
Returns an error message if any validation data is missing or invalid.
This will either return the customValidationDataError message provided via the ValidatorMessages in the messages argument of the contstructor or the message returned by genericValidationDataError() if there is no customValidationDataError message available.
When writing a new ValidatorRule, use this in your reimplementation of validate() if validation data like compare values is missing or invalid.
The pointer to the current Context c will be used to translate error strings. If you have some more data to use for the error messages, put them into errorData.
Definition at line 116 of file validatorrule.cpp.
References genericValidationDataError(), Cutelyst::Context::qtTrId(), and Cutelyst::Context::translate().
Referenced by Cutelyst::ValidatorAfter::genericParsingError(), Cutelyst::ValidatorBefore::genericParsingError(), Cutelyst::ValidatorAfter::genericValidationError(), Cutelyst::ValidatorBefore::genericValidationError(), Cutelyst::ValidatorBetween::genericValidationError(), Cutelyst::ValidatorMax::genericValidationError(), Cutelyst::ValidatorMin::genericValidationError(), Cutelyst::ValidatorSize::genericValidationError(), Cutelyst::ValidatorAfter::validate(), Cutelyst::ValidatorBefore::validate(), Cutelyst::ValidatorBetween::validate(), Cutelyst::ValidatorCharNotAllowed::validate(), Cutelyst::ValidatorDigits::validate(), Cutelyst::ValidatorDigitsBetween::validate(), Cutelyst::ValidatorFileSize::validate(), Cutelyst::ValidatorIn::validate(), Cutelyst::ValidatorInteger::validate(), Cutelyst::ValidatorMax::validate(), Cutelyst::ValidatorMin::validate(), Cutelyst::ValidatorNotIn::validate(), Cutelyst::ValidatorRegularExpression::validate(), Cutelyst::ValidatorRequiredIf::validate(), Cutelyst::ValidatorRequiredIfStash::validate(), Cutelyst::ValidatorRequiredUnless::validate(), Cutelyst::ValidatorRequiredUnlessStash::validate(), Cutelyst::ValidatorRequiredWith::validate(), Cutelyst::ValidatorRequiredWithAll::validate(), Cutelyst::ValidatorRequiredWithout::validate(), Cutelyst::ValidatorRequiredWithoutAll::validate(), and Cutelyst::ValidatorSize::validate().
|
protected |
Returns a descriptive error message if validation failed.
This will either return the customValidationError message provided via the ValidatorMessages in the messages argument of the constructor or the message returned by genericValidationError() if there is no customValidationError message availabe.
When writing a new ValidatorRule, use this in your reimplementaion of validate() if validation failed.
The pointer to the current Context c will be used to translate error strings. If you have some more data to use for the error messages, put them into errorData.
Definition at line 61 of file validatorrule.cpp.
References genericValidationError(), Cutelyst::Context::qtTrId(), and Cutelyst::Context::translate().
Referenced by Cutelyst::ValidatorAccepted::validate(), Cutelyst::ValidatorAfter::validate(), Cutelyst::ValidatorAlpha::validate(), Cutelyst::ValidatorAlphaDash::validate(), Cutelyst::ValidatorAlphaNum::validate(), Cutelyst::ValidatorBefore::validate(), Cutelyst::ValidatorBetween::validate(), Cutelyst::ValidatorBoolean::validate(), Cutelyst::ValidatorCharNotAllowed::validate(), Cutelyst::ValidatorConfirmed::validate(), Cutelyst::ValidatorDate::validate(), Cutelyst::ValidatorDateTime::validate(), Cutelyst::ValidatorDifferent::validate(), Cutelyst::ValidatorDigits::validate(), Cutelyst::ValidatorDigitsBetween::validate(), Cutelyst::ValidatorDomain::validate(), Cutelyst::ValidatorEmail::validate(), Cutelyst::ValidatorFileSize::validate(), Cutelyst::ValidatorFilled::validate(), Cutelyst::ValidatorIn::validate(), Cutelyst::ValidatorInteger::validate(), Cutelyst::ValidatorIp::validate(), Cutelyst::ValidatorJson::validate(), Cutelyst::ValidatorMax::validate(), Cutelyst::ValidatorMin::validate(), Cutelyst::ValidatorNotIn::validate(), Cutelyst::ValidatorNumeric::validate(), Cutelyst::ValidatorPresent::validate(), Cutelyst::ValidatorPwQuality::validate(), Cutelyst::ValidatorRegularExpression::validate(), Cutelyst::ValidatorRequired::validate(), Cutelyst::ValidatorRequiredIf::validate(), Cutelyst::ValidatorRequiredIfStash::validate(), Cutelyst::ValidatorRequiredUnless::validate(), Cutelyst::ValidatorRequiredUnlessStash::validate(), Cutelyst::ValidatorRequiredWith::validate(), Cutelyst::ValidatorRequiredWithAll::validate(), Cutelyst::ValidatorRequiredWithout::validate(), Cutelyst::ValidatorRequiredWithoutAll::validate(), Cutelyst::ValidatorSame::validate(), Cutelyst::ValidatorSize::validate(), Cutelyst::ValidatorTime::validate(), and Cutelyst::ValidatorUrl::validate().
|
protected |
Returns the value of the field from the input params.
Definition at line 34 of file validatorrule.cpp.
References QMultiMap::empty(), and QMultiMap::value().
Referenced by Cutelyst::ValidatorDomain::validate(), Cutelyst::ValidatorCharNotAllowed::validate(), Cutelyst::ValidatorPwQuality::validate(), Cutelyst::ValidatorFileSize::validate(), Cutelyst::ValidatorAccepted::validate(), Cutelyst::ValidatorAfter::validate(), Cutelyst::ValidatorAlpha::validate(), Cutelyst::ValidatorAlphaDash::validate(), Cutelyst::ValidatorAlphaNum::validate(), Cutelyst::ValidatorBefore::validate(), Cutelyst::ValidatorBetween::validate(), Cutelyst::ValidatorBoolean::validate(), Cutelyst::ValidatorConfirmed::validate(), Cutelyst::ValidatorDate::validate(), Cutelyst::ValidatorDateTime::validate(), Cutelyst::ValidatorDifferent::validate(), Cutelyst::ValidatorDigits::validate(), Cutelyst::ValidatorDigitsBetween::validate(), Cutelyst::ValidatorEmail::validate(), Cutelyst::ValidatorFilled::validate(), Cutelyst::ValidatorIn::validate(), Cutelyst::ValidatorInteger::validate(), Cutelyst::ValidatorIp::validate(), Cutelyst::ValidatorJson::validate(), Cutelyst::ValidatorMax::validate(), Cutelyst::ValidatorMin::validate(), Cutelyst::ValidatorNotIn::validate(), Cutelyst::ValidatorNumeric::validate(), Cutelyst::ValidatorPresent::validate(), Cutelyst::ValidatorRegularExpression::validate(), Cutelyst::ValidatorRequired::validate(), Cutelyst::ValidatorRequiredIf::validate(), Cutelyst::ValidatorRequiredIfStash::validate(), Cutelyst::ValidatorRequiredUnless::validate(), Cutelyst::ValidatorRequiredUnlessStash::validate(), Cutelyst::ValidatorRequiredWith::validate(), Cutelyst::ValidatorRequiredWithAll::validate(), Cutelyst::ValidatorRequiredWithout::validate(), Cutelyst::ValidatorRequiredWithoutAll::validate(), Cutelyst::ValidatorSame::validate(), Cutelyst::ValidatorSize::validate(), Cutelyst::ValidatorTime::validate(), and Cutelyst::ValidatorUrl::validate().