ValidationResult
in package
FinalYes
CRUDUI validation result — { valid, errors, hidden } (SPEC G-B). Port of the JS ValidationResult shape. `errors` is a flat list of error records, each { path, field, rule, message, value }, identical in every runtime so the 4-language fixture compares bit-for-bit.
Table of Contents
Properties
Methods
- __construct() : mixed
-
toArray()
: array{valid: bool, errors: list
>, hidden: list } - Plain-array form for fixture comparison (matches the shared fixture's `expected` shape exactly).
Properties
$errors read-only
public
array<string|int, mixed>
$errors
$hidden read-only
public
array<string|int, mixed>
$hidden
$valid read-only
public
bool
$valid
Methods
__construct()
public
__construct(bool $valid, array<int, array<string, mixed>> $errors, array<int, string> $hidden) : mixed
Parameters
- $valid : bool
-
true when
errorsis empty - $errors : array<int, array<string, mixed>>
-
flat list of error records
- $hidden : array<int, string>
-
data paths of the fields whose design.show resolves to false
toArray()
Plain-array form for fixture comparison (matches the shared fixture's `expected` shape exactly).
public
toArray() : array{valid: bool, errors: list>, hidden: list}