SimpleValidation
Simple validation decorator
- Full name:
\Qubus\Form\FormBuilder\Decorator\SimpleValidation - Parent class:
\Qubus\Form\FormBuilder\Decorator
Properties
callback
Methods
__construct
Parameters:
| Parameter | Type | Description |
|---|---|---|
$callback | callable |
validation
Modify the value
Parameters:
| Parameter | Type | Description |
|---|---|---|
$element | \Qubus\Form\FormBuilder\Element | |
$isValid | mixed |
Inherited methods
isDeep
Whether to apply the decorator to all descendants.
apply
Apply modifications.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$element | \Qubus\Form\FormBuilder\Element | |
$deep | bool | The decorator of a parent is applied to a child. |
validate
Validate the element
Parameters:
| Parameter | Type | Description |
|---|---|---|
$element | \Qubus\Form\FormBuilder\Element | |
$valid | bool | Result of FormBuilder validation. |
filter
Modify the value.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$element | \Qubus\Form\FormBuilder\Element | |
$value | mixed |
render
Render to HTML
Parameters:
| Parameter | Type | Description |
|---|---|---|
$element | \Qubus\Form\FormBuilder\Element | |
$html | string | Original rendered html. |
renderContent
Render the element content to HTML
Parameters:
| Parameter | Type | Description |
|---|---|---|
$element | \Qubus\Form\FormBuilder\Element | |
$html | string | Original rendered html. |
applyToValidationScript
Parameters:
| Parameter | Type | Description |
|---|---|---|
$param | \Qubus\Form\FormBuilder\Control | |
$rules | array |