Rules
class Rules extends Object implements IteratorAggregate
List of validation & condition rules.
Constants
internal VALIDATE_PREFIX |
|
Properties
static array | $defaultMessages |
Methods
Makes control mandatory.
Is control mandatory?
Adds a validation rule for the current control.
Adds a validation condition and returns new branch.
Adds a validation condition on specified control a returns new branch.
Adds a else statement.
Ends current validation condition.
No description
No description
Validates against ruleset.
Iterates over complete ruleset.
Details
at line 63
__construct(IControl $control)
No description
at line 74
Rules
setRequired($value = TRUE)
Makes control mandatory.
at line 89
bool
isRequired()
Is control mandatory?
at line 102
Rules
addRule($validator, $message = NULL, $arg = NULL)
Adds a validation rule for the current control.
at line 125
Rules
addCondition($validator, $arg = NULL)
Adds a validation condition and returns new branch.
at line 138
Rules
addConditionOn(IControl $control, $validator, $arg = NULL)
Adds a validation condition on specified control a returns new branch.
at line 157
Rules
elseCondition()
Adds a else statement.
at line 172
Rules
endCondition()
Ends current validation condition.
at line 184
Rules
toggle($id, $hide = TRUE)
Toggles HTML element visibility.
at line 195
array
getToggles($actual = FALSE)
No description
at line 205
array
getToggleStates($toggles = array(), $success = TRUE)
internal |
No description
at line 224
bool
validate()
Validates against ruleset.
at line 245
static bool
validateRule(Rule $rule)
Validates single rule.
at line 260
ArrayIterator
getIterator()
Iterates over complete ruleset.
at line 300
static
formatMessage(Rule $rule, $withValue = TRUE)
No description