Rules
class Rules implements IteratorAggregate
List of validation & condition rules.
Properties
static deprecated | $defaultMessages |
Methods
Makes control mandatory.
Is control mandatory?
No description
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.
No description
Clear all validation rules.
Iterates over complete ruleset.
Details
at line 39
__construct(IControl $control)
No description
at line 50
Rules
setRequired($value = true)
Makes control mandatory.
at line 65
bool
isRequired()
Is control mandatory?
at line 74
isOptional()
internal |
No description
at line 87
Rules
addRule($validator, $errorMessage = null, $arg = null)
Adds a validation rule for the current control.
at line 113
Rules
addCondition($validator, $arg = null)
Adds a validation condition and returns new branch.
at line 132
Rules
addConditionOn(IControl $control, $validator, $arg = null)
Adds a validation condition on specified control a returns new branch.
at line 151
Rules
elseCondition()
Adds a else statement.
at line 166
Rules
endCondition()
Ends current validation condition.
at line 177
Rules
addFilter($filter)
Adds a filter callback.
at line 196
Rules
toggle($id, $hide = true)
Toggles HTML element visibility.
at line 207
array
getToggles($actual = false)
No description
at line 217
array
getToggleStates($toggles = [], $success = true)
internal |
No description
at line 236
bool
validate($emptyOptional = false)
Validates against ruleset.
at line 260
check()
internal |
No description
at line 283
reset()
Clear all validation rules.
at line 293
static bool
validateRule(Rule $rule)
Validates single rule.
at line 308
Iterator
getIterator()
Iterates over complete ruleset.