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.
Declarative by design
Author validations like unit tests with suites, hooks, and familiar assertions.
Framework agnostic
Use Vest anywhere—React, Vue, Svelte, vanilla JS, or your favorite stack.
Async ready
Handle async flows out of the box with deterministic state management.
Extendable core
Add custom validation rules and share suites across teams with ease.
Tiny footprint
Zero dependencies and a few KBs—perfect for modern, lean bundles.
Test-like ergonomics
Readable error messages, deterministic runs, and intuitive APIs.