Property | Type | Description | |
---|---|---|---|
$defaultMessages |
Method | Description | |
---|---|---|
__construct ( Nette\Forms\IControl $control ) | ||
addCondition ( $validator, $arg = NULL ) : self | Adds a validation condition and returns new branch. | |
addConditionOn ( Nette\Forms\IControl $control, $validator, $arg = NULL ) : self | Adds a validation condition on specified control a returns new branch. | |
addFilter ( $filter ) : self | Adds a filter callback. | |
addRule ( $validator, $message = NULL, $arg = NULL ) : self | Adds a validation rule for the current control. | |
check ( ) | ||
elseCondition ( ) : self | Adds a else statement. | |
endCondition ( ) : |
Ends current validation condition. | |
getIterator ( ) : ArrayIterator | Iterates over complete ruleset. | |
getToggleStates ( $toggles = [], $success = TRUE ) : array | ||
getToggles ( $actual = FALSE ) : array | ||
isOptional ( ) | ||
isRequired ( ) : boolean | Is control mandatory? | |
setRequired ( $value = TRUE ) : self | Makes control mandatory. | |
toggle ( $id, $hide = TRUE ) : self | Toggles HTML element visibility. | |
validate ( $emptyOptional = FALSE ) : boolean | Validates against ruleset. | |
validateRule ( |
Validates single rule. |
Method | Description | |
---|---|---|
adjustOperation ( $rule ) : void | Process 'operation' string. | |
getCallback ( $rule ) |
public __construct ( Nette\Forms\IControl $control ) | ||
$control | Nette\Forms\IControl |
public addCondition ( $validator, $arg = NULL ) : self | ||
return | self | new branch |
public addConditionOn ( Nette\Forms\IControl $control, $validator, $arg = NULL ) : self | ||
$control | Nette\Forms\IControl | |
return | self | new branch |
public addRule ( $validator, $message = NULL, $arg = NULL ) : self | ||
return | self |
public elseCondition ( ) : self | ||
return | self | else branch |
public endCondition ( ) : |
||
return | parent branch |
public getIterator ( ) : ArrayIterator | ||
return | ArrayIterator |
public getToggleStates ( $toggles = [], $success = TRUE ) : array | ||
return | array |
public setRequired ( $value = TRUE ) : self | ||
return | self |
public toggle ( $id, $hide = TRUE ) : self | ||
return | self |
public static validateRule ( |
||
$rule | ||
return | boolean |