Schema API

Reference

Schema API

A schema says what shape content has. Val reads it to type your code, to validate content, and to give each field the right editor in the Studio.

Use it for

  • Deciding what editors can change, and what they cannot
  • Typing content end to end, from the .val.ts file to the component

Schema

Val provides a comprehensive set of schema types to define your content structure. Each schema type has its own methods and validation options.

Available Schema Types