# @contentful/experiences-validators

> *Note*: This package is not meant to be used directly by the end user. It is a dependency for the Studio Experiences packages. Changes to this package are not guaranteed to follow semantic versioning and may break without notice if used directly.

Latest version **4.0.1** (published 2026-10-09) · 0 weekly downloads

## Install

```sh
npm install @contentful/experiences-validators
pnpm add @contentful/experiences-validators
yarn add @contentful/experiences-validators
bun add @contentful/experiences-validators
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2026-10-09 |
| First published | 2024-02-15 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 227.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Maintainers | it-internal, whydah-gally, contentful-ecosystem, michaelpearce |

## Links

- npm: https://www.npmjs.com/package/@contentful/experiences-validators
- Repository: https://github.com/contentful/experience-builder
- Homepage: https://github.com/contentful/experience-builder/tree/next/packages/validators#readme
- Issues: https://github.com/contentful/experience-builder/issues
- npm.io page: https://npm.io/package/@contentful/experiences-validators

## Dependencies (1)

- [zod](https://npm.io/package/zod.md) ^4.4.3

## Recent versions

- 4.0.1 (latest) — 2026-10-09
- 4.0.2-dev-20261016T2337-3cf6f10.0 (dev) — 2026-10-16
- 4.0.1-beta.0 (next) — 2026-10-09
- 3.8.0-prerelease-20251001T1442-021a279.0 (prerelease) — 2025-10-01
- 3.0.0-alpha-20250805T1527-42cce69.0 (alpha) — 2025-08-05
- 4.0.2-dev-20261016T0059-6677253.0 — 2026-10-16
- 4.0.2-dev-20261015T2349-ebd9173.0 — 2026-10-15
- 4.0.2-dev-20261015T2302-41c433e.0 — 2026-10-15
- 4.0.2-dev-20261015T0428-56e3b42.0 — 2026-10-15
- 4.0.2-dev-20261015T0334-10dd756.0 — 2026-10-15
- 4.0.2-dev-20261015T0250-69620c5.0 — 2026-10-15
- 4.0.2-dev-20261015T0151-d89f384.0 — 2026-10-15
- 4.0.2-dev-20261015T0031-4c28e26.0 — 2026-10-15
- 4.0.2-dev-20261014T2349-2294523.0 — 2026-10-14
- 4.0.2-dev-20261014T0145-46c8f28.0 — 2026-10-14
- … 815 more at https://npm.io/package/@contentful/experiences-validators/versions

## README

# @contentful/experiences-validators

## Private Package Notice

*Note*: This package is not meant to be used directly by the end user. It is a dependency for the Studio Experiences packages. Changes to this package are not guaranteed to follow semantic versioning and may break without notice if used directly.

This package defines schemas and validator functions for experience data structures in the [Experiences SDK](https://www.contentful.com/developers/docs/experiences/set-up-experiences-sdk/). These validators ensure the integrity and correctness of the data used in experiences.

## Purpose

Defines and exports schema validators for experience and pattern entries as well for component definitions.
Exports types related to experience fields inferred from the schemas.


## Concepts
- **schemaVersion** Each experience or pattern entry contains the schema version it need to conform to under `fields` -> `componentTree` -> `schemaVersion`. We use this version to know which schema validations to run.
- **schemas** Under the schemas folder we define the schema validations for each schema version we support. Can also contain other schema used
in Studio Experiences, e.g. schema for the component definitions. All schemas are defined using the [Zod](https://zod.dev/) libary.
- **validators** Functions that validate different entities, e.g. experiences using the schemas defined in this package.
- **ExperienceEntryFields** This includes only the reserved key terms for experiences fields: `componentTree`, `dataSource`, `unboundValues`, `componentSettings` and `usedComponents`. These validators are not meant to validate any custom fields.
- This package is built for both CommonJS and ESM format as it is being used both in our frontend and backend applications.

### Relevant Contentful Documentation Links
- [Contentful Entry Tree Data Structure](https://www.contentful.com/developers/docs/experiences/data-structures/)

---
_Source: https://npm.io/package/@contentful/experiences-validators · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
