Validate a MotionSpec (trust boundary)
motion_validateValidate a MotionSpec before compiling: check schema compliance, allowed primitives, parameter bounds, and injection risks. Get precise errors plus WCAG 2.2.2 reduced-motion warnings, with ok=false on failure.
Instructions
Checks a MotionSpec against the schema, the primitive allow-list, parameter bounds and injection rules. Fail-closed: returns ok=false with precise errors. Returns {ok, errors, warnings, deprecations, catalogVersion}. IMPORTANT: warnings[] carries the WCAG 2.2.2 / reduced-motion findings and can be non-empty while ok=true — a spec that compiles is not automatically accessible. Use to pre-check a spec before compiling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | The MotionSpec JSON object |