CRUDUI PHP API

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

$errors  : array<string|int, mixed>
$hidden  : array<string|int, mixed>
$valid  : bool

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

Methods

__construct()

public __construct(bool $valid, array<int, array<string, mixed>> $errors, array<int, string> $hidden) : mixed
Parameters
$valid : bool

true when errors is 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}
Return values
array{valid: bool, errors: list>, hidden: list}
On this page

Search results