API reference / Quittio \ Core \ Validation
ValidationMessage
final readonly class in quittio/core · implements JsonSerializable
Quittio\Core\Validation\ValidationMessage · Source
A single validation finding.
Properties#
| Property | Type | Description |
|---|---|---|
$bt readonly | ?string | |
$code readonly | string | |
$hint readonly | ?string | |
$level readonly | ValidationLevel | |
$message readonly | string | |
$path readonly | ?string | |
$severity readonly | Severity | |
$xpath readonly | ?string |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->isError() | |
->jsonSerialize() | |
->toArray() |
__construct()#
public function __construct(
Severity $severity,
string $code,
string $message,
ValidationLevel $level,
?string $bt = null,
?string $path = null,
?string $hint = null,
?string $xpath = null,
)| Parameter | Type | Description |
|---|---|---|
$severity | Severity | |
$code | string | |
$message | string | |
$level | ValidationLevel | |
$bt | ?string = null | |
$path | ?string = null | |
$hint | ?string = null | |
$xpath | ?string = null |
isError()#
public function isError(): bool- Returns
bool
jsonSerialize()#
public function jsonSerialize(): array<string, string|null>- Returns
array<string, string|null>
toArray()#
public function toArray(): array{severity: string, code: string, message: string, level: string, bt: ?string, path: ?string, hint: ?string, xpath: ?string}- Returns
array{severity: string, code: string, message: string, level: string, bt: ?string, path: ?string, hint: ?string, xpath: ?string}