Skip to content

TypeScript API / @laikacms/astro/live / LiveValidateOptions

Interface: LiveValidateOptions ​

Validate live entries against the collection's catalog-derived schema.

Off by default, and deliberately: a build-time collection is validated once per build, but this runs on every request, and this module ships in the server bundle of every page that reads a live collection. Turning it on is a per-loader decision because the cost is per-loader.

Both catalog and z are required when on. Neither is inferable here — the loader is handed a repository, not the options that built one, and z has to be the project's own astro:content import so there is exactly one Zod in the build (the same reasoning as jsonSchemaToZod).

Properties ​

catalog ​

ts
catalog: CatalogProvider;

z ​

ts
z: ZodNamespace;

Released under the MIT License.