Quick startHow it worksPricing
DocsLogin
Schema API
Getting started
Reference
OverviewModule Files
Schema API
StringDateNumberBooleanLiteralObjectArrayRecordRouterUnionKey ofRouteImageFileRich TextNullable
Type APIContent APIVal HelperHooksServer sideReact ComponentsCLI
Guides
Troubleshooting

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

s.string()

Text values with validation and rendering options

s.number()

Numeric values with min/max validation

s.boolean()

True/false values

s.literal()

Fixed literal values, used with unions

s.date()

Date values (date-only, not datetime) with ISO 8601 formatting

s.object()

Complex objects with defined properties

s.array()

Lists of items with a defined schema

s.record()

Key-value pairs with dynamic keys

s.route()

Route references validated against router modules

s.router()

Shorthand for creating router configurations

s.union()

One of multiple values

s.keyOf()

References to keys in other Val modules

s.image()

Image files with metadata and remote support

s.file()

Generic files including videos and documents

s.richtext()

Formatted text with configurable options

Previous
Schema API
Next
s.string()

Hard-coded, super-charged, Content As Code - a CMS with the ultimate developer experience.

Community

GitHubDiscord

Legal & Pricing

Terms of ServicePricing

© 2026 Val. All rights reserved.

Privacy Policy