Home > @polyspec/crudui-validator > validateList
validateList() function
Validate a CRUDUI list-spec STRUCTURE. The spec's columns map (and a { $ref, $patch } search overlay) may carry composition; it is expanded first via the compose pass — the SAME engine form-spec uses. An unresolved composition throws ComposeLoadError (caller distinguishes a LOAD failure from valid:false). A forbidden meta key anywhere in the composed list tree is likewise a LOAD failure. NO rows/data are validated (SPEC §9: rows are injected).
Signature:
export declare function validateList(spec: Record<string, unknown>, options?: ValidateListOptions): ListValidationResult;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
spec |
Record<string, unknown> |
a CRUDUI list root spec ( |
|
options |
(Optional) compose loader / file set / basepath. |
Returns:
{ valid: true, errors: [] } when the structure loads cleanly.
Exceptions
ComposeLoadError when composition cannot be resolved OR a forbidden meta key survives into the composed list tree.