Skip to main content

ivo

A user-story-focused, event-driven data validation framework for TypeScript and Rust.

npm i ivo
Get started
user.ts
import { Schema } from "ivo";

type User = { username: string; bio: string };

const UserModel = new Schema<User>((b) =>
b
.field(
b
.required("username")
.validate((v) => typeof v === "string" && v.length >= 3),
)
.field(b.lax("bio", "")),
).getModel();

await UserModel.create({ username: "ada" });
await UserModel.create({});
Output
{ data: { username: "ada", bio: "" }, error: null }
{
data: null,
error: {
username: { reason: "'username' is required", metadata: null },
},
}

User-story-focused validation

Enforce complex, multi-field invariants that keep a domain entity from ever entering an invalid state - not just isolated per-field checks.

Event-driven lifecycle

Subscribe to creation, update and deletion lifecycles at both the entity and individual field level with onSuccess, onFailure and onDelete handlers.

TypeScript & Rust, one model

The same constant, dependent, lax, required and virtual field concepts apply in both implementations, so switching languages doesn't mean relearning the mental model.

Performance

Median time per operation

Create, one field
520 nsTypeScript27 nsRust
Create, a chain of 10 dependents
1.48 µsTypeScript213 nsRust
Create a user (validators, dependents)
2.84 µsTypeScript1.75 µsRust
Update with nothing to change
358 nsTypeScript56 nsRust

Measured on an Apple M4: TypeScript (Bun 1.4.4, 2026-11-12), Rust (rustc 1.99.1, 2026-10-18).