[Abstract] Used for validating member property values of XCube_ActionForm. More...
Public Member Functions | |
| __construct (&$form) | |
| Constructor. | |
| setDependsByArray ( $dependsArr) | |
| Initializes the list of validators for this field property with the list of dependency rule names. | |
| addMessage ( $name, $message) | |
| Adds an error message that will be used if the validation of the "$name" rule fails. | |
| renderMessage (string $name) | |
| Gets the error message rendered by XCube_Utils::formaString(). | |
| addVar ( $name, $value) | |
| Adds a virtual variable used by validators. | |
| validate (&$form) | |
| Validates the form property with the validators that the field's property contains. | |
Data Fields | |
| $mForm | |
| XCube_ActionForm - Parent form contains this field property. | |
| $mDepends | |
| XCube_Validator[] - std::map<string, XCube_Validator*> | |
| $mMessages | |
| Complex Array. | |
| $mVariables | |
| Hash-Map Array - std::map<string, mixed> | |
[Abstract] Used for validating member property values of XCube_ActionForm.
| __construct | ( | & | $form | ) |
Constructor.
| XCube_ActionForm | $form | - Parent form. |
| addMessage | ( | $name, | |
| $message ) |
Adds an error message that will be used if the validation of the "$name" rule fails.
| string | $name | - Dependent rule name. |
| string | $message | - Error message. |
It's possible to add 3 or more parameters. These additional parameters are used by XCube_Utils\formatString().
This feature is helpful for automatic ActionForm generators.
| addVar | ( | $name, | |
| $value ) |
Adds a virtual variable used by validators.
| string | $name | - A name of the variable. |
| mixed | $value | - A value of the variable. |
Virtual variables are used to be validated by validators. For example, XCube_MinlengthValidator needs a value indicating a minimum length.
| renderMessage | ( | string | $name | ) |
Gets the error message rendered by XCube_Utils::formaString().
| string | $name | - Dependent rule name. |
Gets the error message registered at addMessage(). If the message parameter has arguments, these are rendered by XCube_Utils\formatString().
This feature is helpful for automatic ActionForm generators.
| setDependsByArray | ( | $dependsArr | ) |
Initializes the list of validators for this field property with the list of dependency rule names.
| string[] | $dependsArr |
| validate | ( | & | $form | ) |
Validates the form property with the validators that the field's property contains.
| $form |
check empty block else
| $mMessages |
Complex Array.
$mMessages[$name]['message'] - string
$mMessages[$name]['args'][] - string