CRUDUI PHP API

ListValidationResult
in package

FinalYes

CRUDUI list-spec validation result — { valid, errors } (SPEC §9). Read sister of ValidationResult. A list carries no data (rows are injected, SPEC §9), so the four-language engine runs only compose + forbidden-scan: a clean structure load is always { valid:true, errors:[] }. A composition/forbidden-key failure is a LOAD failure (a thrown ComposeLoadError), NOT a valid:false result — so this shape is the clean-load companion, idempotent with the JS validateList return.

Table of Contents

Properties

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

Methods

__construct()  : mixed
toArray()  : array{valid: bool, errors: list>}
Plain-array form for fixture comparison.

Properties

Methods

__construct()

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

true when errors is empty

$errors : array<int, array<string, mixed>>

flat list of error records (empty on a clean structure load)

toArray()

Plain-array form for fixture comparison.

public toArray() : array{valid: bool, errors: list>}
Return values
array{valid: bool, errors: list>}
On this page

Search results