Methods |
public
static
|
set(string $key, mixed $value = null): void
Setter
Parameters
$key |
The property name
|
$value |
The value for the property
|
|
#
|
public
static
|
get(string $key): mixed
Getter
|
#
|
public
static
|
check(array $validations, array $data, string $type = self::TYPE_MULTI): bool
Check all inputs according to the validation rules provided
Check all inputs according to the validation rules provided
Parameters
$validations |
The array of the validation rules
|
$data |
The optional data array (if no value in $validation, it will be looked up in $data)
|
$type |
The return form of the error message:
"multi" to return all error messages occurred;
"single" to return the first error message occurred
|
|
#
|
public
static
|
addError(string $id, string $msg): void
Add an external error message
Add an external error message
Parameters
$id |
HTML ID
|
$msg |
The error message to show
|
|
#
|