◆ getValidationScript()
MoodleQuickForm_Rule_Required::getValidationScript |
( |
|
$format = null | ) |
|
This function returns Javascript code used to build client-side validation.
It checks if an element is not empty.
- Parameters
-
int | $format | format of data which needs to be validated. |
- Return values
-
◆ validate()
MoodleQuickForm_Rule_Required::validate |
( |
|
$value, |
|
|
|
$options = null |
|
) |
| |
Checks if an element is not empty.
This is a server-side validation, it works for both text fields and editor fields
- Parameters
-
string | $value | Value to check |
int | string | array | $options | Not used yet |
- Return values
-
bool | true if value is not empty |
The documentation for this class was generated from the following file: