Home > @polyspec/crudui-validator
crudui-validator package
Classes
|
Class |
Description |
|---|---|
|
Base class for every composition load failure. NOT a validation error. | |
|
Submitted form data whose shape does not match the specification. |
Functions
|
Function |
Description |
|---|---|
|
The data paths of the fields whose | |
|
Validate | |
|
Validate a detail specification's composition and forbidden-key structure. | |
|
Validate a CRUDUI list-spec STRUCTURE. The spec's |
Interfaces
|
Interface |
Description |
|---|---|
|
Common (all-type) behavior scripts (SPEC §4). Values are opaque client JS passed through verbatim and never routed through the expression engine. | |
|
A group of choices in a choice list (docs/spec/schema.md, "Choice groups"). Only the choice list of a select field and the | |
|
One choice of a field's | |
|
One choice of a choice list (docs/spec/schema.md, "Choice lists"). The option value is the canonical text of | |
|
Per-node appearance: | |
|
Appearance slot = visibility condition ( | |
|
The design slot of a form field: the design slot with declared attributes and a group's layout. | |
|
CRUDUI field specification. Top level holds only first-class keys (SPEC §3 B): structure/identity, content, and the four role slots. All non-first-class detail is pushed under its dependency target (§3 C). A schema layer closes the top level ( | |
|
The wrapper node of a form field: appearance and the attributes of the node root. | |
|
Loads a normalized file key to its parsed document. Throws | |
|
Submission target of the form, kept unchanged in the template. | |
|
One form button. A button or link needs text; a link needs href. | |
|
Nested model descriptor of a dynamic source ( | |
|
Dynamic option source (dependency isolation: dynamic items → STRUCTURE ONLY. This type fixes the declared shape of a dynamic source; it does NOT load options. The supported shape ( | |
|
Per-language override map (one of the two | |
|
Input multilingual settings object (kept under | |
|
The result of checking a list or detail declaration: whether it is valid and its errors. | |
|
Custom error messages by registered rule name. Any other key fails the load with | |
|
Settings of rows that exist only in the data: the data keys are the rows and the form offers no row controls; only | |
|
Settings of rows that the form adds, removes, copies and moves. | |
|
Type-dependent settings (dependency isolation: type → | |
|
Composition change directive ($patch). Deep paths map to values (set/replace); the resolution order is | |
|
Context for path resolution | |
|
A range field (docs/spec/schema.md, Range fields): a number chosen on a slider whose bounds and increment are the literal | |
|
Options for a detail structure validation run. | |
|
Options for a CRUDUI list validation run (mirrors | |
|
Options for a CRUDUI validation run. | |
|
Validation rules (SPEC §3 The named members are every built-in rule, with the parameter shapes the meta-schema declares; | |
|
Single validation error | |
|
The result of validating form data: whether it is valid, its errors and the data paths that |
Type Aliases
|
Type Alias |
Description |
|---|---|
|
A behavior entry: an opaque client-JS script string, or | |
|
The choices and groups of a field's | |
|
Choices in list order for any values. | |
|
Machine-readable load-error codes. | |
|
Declaration-ordered condition map (expressions.md §8). Each key is an Expression (§2 grammar); keys are evaluated top-to-bottom and the value of the first truthy key is returned. If none match, the value of the The condition map is a thin wrapper that calls the engine repeatedly; it is not a separate parser. | |
|
Attributes a form field declares for an element: a | |
|
An evaluated value: either a single Expression or a ConditionMap. Used by | |
|
A single restricted-DSL expression string (expressions.md §2): paths ( | |
|
Virtual files available to | |
|
A static option label (display only). A plain string or a per-language LangMap (G3 content translation); the option VALUE is the map key, the label is just for display, so the label never participates in membership. Empty label may be | |
|
Static value→label map (SPEC §2 G3): the key is the option value (the membership target), the entry is its display label — a string or a LangMap, e.g. | |
|
Option source: an array of labels whose indexes are the values, a choice list ( | |
|
Input multilingual settings (dependency isolation: lang-dependent → | |
|
Multilingual content map (G3 content translation): a value translated per language by the spec author, e.g. | |
|
Per-language overrides indexed by language code. | |
|
A loaded YAML document (a parsed object tree). | |
|
Field content text that may be a plain string or a per-language LangMap (G3). Empty content is omitted or | |
|
Repeated-row settings (dependency isolation: multiple-dependent → Row identity is not a The named keys are the canonical | |
|
Repeated-row settings object (kept under | |
|
Child field map (group/object). A | |
|
Composition reference: one file path, or a list of paths resolved in declaration order where a later path overrides an earlier one. A path may select a fragment of a file as | |
|
Polymorphic role-slot value (SPEC G2). | |
|
A label of an array whose indexes are the values. |