Rules
class Rules extends Object implements IteratorAggregate
List of validation & condition rules.
Properties
static deprecated | $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 37
__construct(IControl $control)
No description
at line 48
Rules
setRequired($value = TRUE)
Makes control mandatory.
at line 63
bool
isRequired()
Is control mandatory?
at line 76
Rules
addRule($validator, $message = NULL, $arg = NULL)
Adds a validation rule for the current control.
at line 102
Rules
addCondition($validator, $arg = NULL)
Adds a validation condition and returns new branch.
at line 118
Rules
addConditionOn(IControl $control, $validator, $arg = NULL)
Adds a validation condition on specified control a returns new branch.
at line 137
Rules
elseCondition()
Adds a else statement.
at line 152
Rules
endCondition()
Ends current validation condition.
at line 163
Rules
addFilter($filter)
Adds a filter callback.
at line 182
Rules
toggle($id, $hide = TRUE)
Toggles HTML element visibility.
at line 193
array
getToggles($actual = FALSE)
No description
at line 203
array
getToggleStates($toggles = array(), $success = TRUE)
internal |
No description
at line 222
bool
validate()
Validates against ruleset.
at line 243
static bool
validateRule(Rule $rule)
Validates single rule.
at line 258
ArrayIterator
getIterator()
Iterates over complete ruleset.