|
Wexus2 0.20
|
#include <ValidationExpr.h>

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) |
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.
| wexus::ValidationExpr::ValidationExpr | ( | void | ) |
Null expression, that doesn't require anything This expression cannot be used or tested.
| 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