Wexus2 0.20
wexus::ValidationExpr Class Reference

#include <ValidationExpr.h>

Inheritance diagram for wexus::ValidationExpr:

List of all members.

Public Member Functions

 ValidationExpr (void)
 ValidationExpr (const ValidationExpr &rhs)
 shallow copy ctor
bool isNull (void) const
 is this the default, null expression
bool test (const QVariant &v, QStringList *outerrors=0) const
QVariant toVariant (void) const
 package this expression into a variant
ValidationExpr operator&& (const ValidationExpr &rhs)
 (short circuit) and operator

Static Public Member Functions

static ValidationExpr fromVariant (const QVariant &v)
 unpackage an expression from the variant
static ValidationExpr optional (void)
 always returns true
static ValidationExpr required (void)
 the value cannot be invalid
static ValidationExpr minLength (int l)
static ValidationExpr maxLength (int l)
static ValidationExpr notEmptyLength (void)
static ValidationExpr minValue (double d)
static ValidationExpr maxValue (double d)
static ValidationExpr isEmail (void)

Detailed Description

A validation expression.

Although there were plans to be able to create nesting operators, compelte with ! || and other operators, this was deemed to confusing with respect to how to make meaningfull error messages. A future project, perhaps.

Author:
Aleksander Demko

Constructor & Destructor Documentation

wexus::ValidationExpr::ValidationExpr ( void  )

Null expression, that doesn't require anything This expression cannot be used or tested.

Author:
Aleksander Demko

Member Function Documentation

bool wexus::ValidationExpr::test ( const QVariant &  v,
QStringList *  outerrors = 0 
) const

tests to se if v meets the requiresments of the expressinall the tests this ValidationExpr cannt be null


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Enumerator