API reference / Quittio \ Core \ Validation
Messages
final class in quittio/core
Quittio\Core\Validation\Messages · Source
Creates validation messages from the message catalog.
The catalog key is "{namespace}::rules.{code}" with the entries "message" and "hint". If no translation exists, the fallback text given by the rule is used.
Methods#
| Method | Description |
|---|---|
::make() |
make()#
public static function make(
ValidationContext $context,
Severity $severity,
string $code,
ValidationLevel $level,
string $fallback,
array<string, string|int> $replace = [],
?string $bt = null,
?string $path = null,
string $namespace = 'quittio',
): ValidationMessage| Parameter | Type | Description |
|---|---|---|
$context | ValidationContext | |
$severity | Severity | |
$code | string | |
$level | ValidationLevel | |
$fallback | string | |
$replace | array<string, string|int> = [] | |
$bt | ?string = null | |
$path | ?string = null | |
$namespace | string = 'quittio' |
- Returns
ValidationMessage