Skip to main content
Modern validations framework

Declarative validations inspired by testing

Declarative validations framework inspired by unit testing libraries

npm i vest
Suite anatomy
import vest, { test, enforce } from 'vest';

const suite = vest.create('signup', () => {
  test('username', 'Must be at least 3 chars', () => {
    enforce(username).longerThanOrEquals(3);
  });
});

export default suite;
Built for predictable DXFramework agnostic

Vest is a form validations framework that looks and feels like a unit testing framework.
It allows you to express your validation logic in a simple and readable way that's also easy to maintain in the long run.


test("username", "Username is required", () => {
enforce(data.username).isNotBlank();
});

test("username", "Username must be at least 3 chars", () => {
enforce(data.username).longerThanOrEquals(3);
});

test('username', 'Username already taken', async () => {
await doesUserExist(data.username);
});
Why Vest

Ship stable forms without boilerplate

A declarative, test-like API that stays framework agnostic, handles async with grace, and keeps bundles lean.

DX

Test-inspired syntax

Write validations that read like unit tests. Vest keeps assertions predictable so teams can onboard quickly.

Interop

Framework agnostic

Drop Vest into any stack—React, Vue, Svelte, Angular, or vanilla. Keep your UI while Vest orchestrates validation logic.

Reliability

Async-ready & stateful

Handle async flows, reuse suites, and let Vest manage the state machinery so you can focus on user experience.

Composable

Extendable by design

Add custom rules or suite patterns without rewriting your forms. Vest stays tiny while remaining flexible.

Performance

Tiny footprint

Zero runtime dependencies and only a few KB gzipped—ideal for teams chasing fast startups and lean bundles.

Productivity

Batteries included

From enforce rules to helpful errors, Vest ships sensible defaults that reduce boilerplate across your product.