Cutelyst  2.5.0
Public Member Functions | Public Attributes | List of all members
Cutelyst::ValidatorReturnType Class Reference

Contains the result of a single input parameter validation. More...

#include <Cutelyst/Plugins/Utils/ValidatorRule>

Public Member Functions

bool isValid () const
 Returns true if validation succeeded. More...
 
 operator bool () const
 Returns true if validation succeeded. More...
 

Public Attributes

QString errorMessage
 
QVariant extra
 
QVariant value
 

Detailed Description

For information about the possible values of value and extra see the documentation of the respective validator rule.

Definition at line 62 of file validatorrule.h.

Member Function Documentation

◆ isValid()

bool Cutelyst::ValidatorReturnType::isValid ( ) const
inline
Returns
true if errorMessage is a null string, indicating that the validation has succeeded.

Definition at line 81 of file validatorrule.h.

◆ operator bool()

Cutelyst::ValidatorReturnType::operator bool ( ) const
inlineexplicit
Returns
true if errorMessage is a null string, indicating that the validation has succeeded.

Definition at line 72 of file validatorrule.h.

Member Data Documentation

◆ errorMessage

QString Cutelyst::ValidatorReturnType::errorMessage

Contains a human readable error message if validation failed that should provide information about the reason the validation failed. If QString::isNull() returns true for this, the validation has succeeded and isValid() will alsor return true.

Definition at line 63 of file validatorrule.h.

Referenced by Cutelyst::ValidatorPresent::validate(), Cutelyst::ValidatorFilled::validate(), Cutelyst::ValidatorRequired::validate(), Cutelyst::ValidatorBoolean::validate(), Cutelyst::ValidatorJson::validate(), Cutelyst::ValidatorConfirmed::validate(), Cutelyst::ValidatorRequiredWithoutAll::validate(), Cutelyst::ValidatorRequiredUnless::validate(), Cutelyst::ValidatorRequiredWithAll::validate(), Cutelyst::ValidatorRequiredWithout::validate(), Cutelyst::ValidatorDifferent::validate(), Cutelyst::ValidatorRegularExpression::validate(), Cutelyst::ValidatorRequiredIf::validate(), Cutelyst::ValidatorRequiredWith::validate(), Cutelyst::ValidatorRequiredIfStash::validate(), Cutelyst::ValidatorIn::validate(), Cutelyst::ValidatorRequiredUnlessStash::validate(), Cutelyst::ValidatorAccepted::validate(), Cutelyst::ValidatorInteger::validate(), Cutelyst::ValidatorNotIn::validate(), Cutelyst::ValidatorNumeric::validate(), Cutelyst::ValidatorTime::validate(), Cutelyst::ValidatorDate::validate(), Cutelyst::ValidatorMin::validate(), Cutelyst::ValidatorMax::validate(), Cutelyst::ValidatorDateTime::validate(), Cutelyst::ValidatorSame::validate(), Cutelyst::ValidatorSize::validate(), Cutelyst::ValidatorUrl::validate(), Cutelyst::ValidatorBetween::validate(), Cutelyst::ValidatorDigitsBetween::validate(), Cutelyst::ValidatorDigits::validate(), Cutelyst::ValidatorAlphaNum::validate(), Cutelyst::ValidatorAlphaDash::validate(), Cutelyst::ValidatorAlpha::validate(), Cutelyst::ValidatorIp::validate(), Cutelyst::ValidatorDomain::validate(), Cutelyst::ValidatorAfter::validate(), Cutelyst::ValidatorBefore::validate(), Cutelyst::ValidatorPwQuality::validate(), Cutelyst::ValidatorFileSize::validate(), Cutelyst::ValidatorEmail::validate(), and Cutelyst::Validator::validate().

◆ extra

QVariant Cutelyst::ValidatorReturnType::extra

Might contain extra data provided by the validator. For information about the possible values see the documentation of the respective validator.

Definition at line 65 of file validatorrule.h.

Referenced by Cutelyst::ValidatorEmail::validate(), and Cutelyst::Validator::validate().

◆ value

QVariant Cutelyst::ValidatorReturnType::value

Might contain the extracted and possibly converted value of the input parameter if validation succeeded. For information about the possible values see the documentation of the respective validator.

Definition at line 64 of file validatorrule.h.

Referenced by Cutelyst::ValidatorRule::defaultValue(), Cutelyst::ValidatorPresent::validate(), Cutelyst::ValidatorFilled::validate(), Cutelyst::ValidatorRequired::validate(), Cutelyst::ValidatorBoolean::validate(), Cutelyst::ValidatorJson::validate(), Cutelyst::ValidatorConfirmed::validate(), Cutelyst::ValidatorRequiredWithoutAll::validate(), Cutelyst::ValidatorRequiredUnless::validate(), Cutelyst::ValidatorRequiredWithAll::validate(), Cutelyst::ValidatorRequiredWithout::validate(), Cutelyst::ValidatorDifferent::validate(), Cutelyst::ValidatorRegularExpression::validate(), Cutelyst::ValidatorRequiredIf::validate(), Cutelyst::ValidatorRequiredWith::validate(), Cutelyst::ValidatorRequiredIfStash::validate(), Cutelyst::ValidatorIn::validate(), Cutelyst::ValidatorRequiredUnlessStash::validate(), Cutelyst::ValidatorAccepted::validate(), Cutelyst::ValidatorInteger::validate(), Cutelyst::ValidatorNotIn::validate(), Cutelyst::ValidatorNumeric::validate(), Cutelyst::ValidatorTime::validate(), Cutelyst::ValidatorDate::validate(), Cutelyst::ValidatorMin::validate(), Cutelyst::ValidatorMax::validate(), Cutelyst::ValidatorDateTime::validate(), Cutelyst::ValidatorSame::validate(), Cutelyst::ValidatorUrl::validate(), Cutelyst::ValidatorSize::validate(), Cutelyst::ValidatorBetween::validate(), Cutelyst::ValidatorDigitsBetween::validate(), Cutelyst::ValidatorDigits::validate(), Cutelyst::ValidatorAlphaNum::validate(), Cutelyst::ValidatorAlphaDash::validate(), Cutelyst::ValidatorAlpha::validate(), Cutelyst::ValidatorIp::validate(), Cutelyst::ValidatorDomain::validate(), Cutelyst::ValidatorAfter::validate(), Cutelyst::ValidatorBefore::validate(), Cutelyst::ValidatorPwQuality::validate(), Cutelyst::ValidatorFileSize::validate(), Cutelyst::ValidatorEmail::validate(), and Cutelyst::Validator::validate().