Skip to main content

Modern validations for ambitious teams

Declarative validations
inspired by unit testing

Declarative validations framework inspired by unit testing libraries

npm i vest
Confidence without ceremony
Zero deps
suite('signup', () => {
  test('username', async () => {
    await enforce(username).isNotBlank();
  });

  test('password', () => {
    enforce(password).longerThan(8);
  });
});
Framework agnosticAsync ready

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);
});

Built for modern DX

Everything you need to trust your forms

Vest pairs a lightweight core with a familiar testing-inspired API, so you can ship confident experiences without fighting your validation layer.

🧾DX

Declarative by design

Author validations like unit tests with suites, hooks, and familiar assertions.

🌐Flexible

Framework agnostic

Use Vest anywhere—React, Vue, Svelte, vanilla JS, or your favorite stack.

⚡️Performance

Async ready

Handle async flows out of the box with deterministic state management.

🧩Composable

Extendable core

Add custom validation rules and share suites across teams with ease.

🎯Shipping

Tiny footprint

Zero dependencies and a few KBs—perfect for modern, lean bundles.

Productivity

Test-like ergonomics

Readable error messages, deterministic runs, and intuitive APIs.