Skip to content

Commit 705748f

Browse files
authored
Fix docs dark mode (#1312)
1 parent 3682303 commit 705748f

34 files changed

Lines changed: 410 additions & 308 deletions

AI_USAGE_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Vest 6 — Consumer Usage Guide
22

3-
Vest is a framework-independent, stateful validation runtime for complex forms and progressive workflows.
3+
Vest is a validation library that keeps test results between runs and does not depend on a UI framework.
44

55
Use Vest when validation unfolds over time: only some fields should run, earlier results must remain available, fields depend on one another, or async checks can overlap.
66

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Vest — TypeScript validation-state framework
1+
# Vest — form validation written like unit tests
22

33
![Vest](https://cdn.jsdelivr.net/gh/ealush/vest@assets/logo_250.png 'Vest')
44

55
[Documentation](https://vestjs.dev) · [Async race demo](https://vestjs.dev/#async-race-demo) · [Getting started](https://vestjs.dev/docs/get_started)
66

77
[![Join Discord](https://badgen.net/discord/online-members/WmADZpJnSe?icon=discord&label=Discord)](https://discord.gg/WmADZpJnSe) [![GitHub Stars](https://badgen.net/github/stars/ealush/vest?color=yellow&label=GitHub%20Stars)](https://github.com/ealush/vest) [![Version](https://badgen.net/npm/v/vest?icon=npm)](https://www.npmjs.com/package/vest) [![Downloads](https://badgen.net/npm/dt/vest?label=Downloads)](https://www.npmjs.com/package/vest) [![Bundle size](https://badgen.net/bundlephobia/minzip/vest)](https://bundlephobia.com/package/vest) [![Status](https://badgen.net/github/status/ealush/vest)](https://github.com/ealush/vest/actions)
88

9-
Vest manages validation as values change over time. It runs only the relevant field or step, retains trustworthy results from earlier interactions, and prevents stale asynchronous work from replacing the current result.
9+
Vest runs the tests for the field or step that changed and keeps the results for everything else. When async checks overlap, only the latest result can update the suite.
1010

1111
> **Vest validates what changed, remembers what already passed, and prevents stale async validation results.**
1212
@@ -43,7 +43,7 @@ await result;
4343
## Why Vest?
4444

4545
- **Incremental execution:** Validate a field, group, or step without rerunning everything.
46-
- **Retained validation state:** Focused runs merge into one complete living result.
46+
- **Retained validation state:** A focused run updates part of the existing result instead of replacing it.
4747
- **Race-safe async:** Track pending work, cancel obsolete requests, and ignore stale completions.
4848
- **Real workflow primitives:** Model dependent fields, conditional sections, warnings, optional values, groups, and dynamic lists.
4949
- **Client and server continuity:** Run statelessly on the server and resume full validation state in the browser.
@@ -62,9 +62,9 @@ await result;
6262

6363
These layers are complementary. A common architecture uses a form manager for input mechanics, Vest for progressive interaction, and a schema validator for the final submitted boundary.
6464

65-
## Strong use cases
65+
## Where Vest works well
6666

67-
Vest is particularly useful for:
67+
Vest works well for:
6868

6969
- async username, email, inventory, coupon, or eligibility checks;
7070
- onboarding and multi-step workflows;
@@ -86,10 +86,10 @@ npm i vest
8686
## Start here
8787

8888
- [Getting started](https://vestjs.dev/docs/get_started)
89-
- [Ten Vest 6 tutorials](https://vestjs.dev/docs/tutorials)
90-
- [How Vest thinks about validation](https://vestjs.dev/docs/concepts)
89+
- [Vest tutorials](https://vestjs.dev/docs/tutorials)
90+
- [How Vest handles validation](https://vestjs.dev/docs/concepts)
9191
- [Async validation without race conditions](https://vestjs.dev/docs/guides/async-validation-race-conditions)
92-
- [Canonical React Hook Form + Standard Schema architecture](https://vestjs.dev/docs/guides/production-architecture)
92+
- [Complete registration example](https://vestjs.dev/docs/guides/production-architecture)
9393
- [When not to use Vest](https://vestjs.dev/docs/guides/when-not-to-use-vest)
9494
- [Vest, schema validators, and form libraries](https://vestjs.dev/docs/vest_vs_the_rest)
9595
- [Consumer AI usage guide](https://vestjs.dev/llms-consumer.txt)

packages/vest/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Vest — TypeScript validation-state framework
1+
# Vest — form validation written like unit tests
22

33
![Vest](https://cdn.jsdelivr.net/gh/ealush/vest@assets/logo_250.png 'Vest')
44

55
[Documentation](https://vestjs.dev) · [Async race demo](https://vestjs.dev/#async-race-demo) · [Getting started](https://vestjs.dev/docs/get_started)
66

77
[![Join Discord](https://badgen.net/discord/online-members/WmADZpJnSe?icon=discord&label=Discord)](https://discord.gg/WmADZpJnSe) [![GitHub Stars](https://badgen.net/github/stars/ealush/vest?color=yellow&label=GitHub%20Stars)](https://github.com/ealush/vest) [![Version](https://badgen.net/npm/v/vest?icon=npm)](https://www.npmjs.com/package/vest) [![Downloads](https://badgen.net/npm/dt/vest?label=Downloads)](https://www.npmjs.com/package/vest) [![Bundle size](https://badgen.net/bundlephobia/minzip/vest)](https://bundlephobia.com/package/vest) [![Status](https://badgen.net/github/status/ealush/vest)](https://github.com/ealush/vest/actions)
88

9-
Vest manages validation as values change over time. It runs only the relevant field or step, retains trustworthy results from earlier interactions, and prevents stale asynchronous work from replacing the current result.
9+
Vest runs the tests for the field or step that changed and keeps the results for everything else. When async checks overlap, only the latest result can update the suite.
1010

1111
> **Vest validates what changed, remembers what already passed, and prevents stale async validation results.**
1212
@@ -43,7 +43,7 @@ await result;
4343
## Why Vest?
4444

4545
- **Incremental execution:** Validate a field, group, or step without rerunning everything.
46-
- **Retained validation state:** Focused runs merge into one complete living result.
46+
- **Retained validation state:** A focused run updates part of the existing result instead of replacing it.
4747
- **Race-safe async:** Track pending work, cancel obsolete requests, and ignore stale completions.
4848
- **Real workflow primitives:** Model dependent fields, conditional sections, warnings, optional values, groups, and dynamic lists.
4949
- **Client and server continuity:** Run statelessly on the server and resume full validation state in the browser.
@@ -62,9 +62,9 @@ await result;
6262

6363
These layers are complementary. A common architecture uses a form manager for input mechanics, Vest for progressive interaction, and a schema validator for the final submitted boundary.
6464

65-
## Strong use cases
65+
## Where Vest works well
6666

67-
Vest is particularly useful for:
67+
Vest works well for:
6868

6969
- async username, email, inventory, coupon, or eligibility checks;
7070
- onboarding and multi-step workflows;
@@ -86,10 +86,10 @@ npm i vest
8686
## Start here
8787

8888
- [Getting started](https://vestjs.dev/docs/get_started)
89-
- [Ten Vest 6 tutorials](https://vestjs.dev/docs/tutorials)
90-
- [How Vest thinks about validation](https://vestjs.dev/docs/concepts)
89+
- [Vest tutorials](https://vestjs.dev/docs/tutorials)
90+
- [How Vest handles validation](https://vestjs.dev/docs/concepts)
9191
- [Async validation without race conditions](https://vestjs.dev/docs/guides/async-validation-race-conditions)
92-
- [Canonical React Hook Form + Standard Schema architecture](https://vestjs.dev/docs/guides/production-architecture)
92+
- [Complete registration example](https://vestjs.dev/docs/guides/production-architecture)
9393
- [When not to use Vest](https://vestjs.dev/docs/guides/when-not-to-use-vest)
9494
- [Vest, schema validators, and form libraries](https://vestjs.dev/docs/vest_vs_the_rest)
9595
- [Consumer AI usage guide](https://vestjs.dev/llms-consumer.txt)

scripts/build-llms.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ const sectionOrder = [
187187
];
188188

189189
let llmsTxt = `# Vest 6
190-
> TypeScript validation-state framework for complex interactive forms. Vest validates what changed, retains trustworthy previous results, and prevents stale async work from corrupting current state.
190+
> Form validation written like unit tests. Vest validates what changed, keeps the other results, and ignores stale async responses.
191191
192192
- [Full Vest 6 documentation](https://vestjs.dev/llms-full.txt)
193193
- [Consumer usage guide](https://vestjs.dev/llms-consumer.txt)
@@ -208,7 +208,7 @@ let llmsTxt = `# Vest 6
208208
Vest composes with schema validators and form managers; these categories are not mutually exclusive.
209209
210210
## Start with a problem
211-
- [Ten Vest 6 tutorials](https://vestjs.dev/docs/tutorials)
211+
- [Vest tutorials](https://vestjs.dev/docs/tutorials)
212212
- [Async validation without race conditions](https://vestjs.dev/docs/guides/async-validation-race-conditions)
213213
- [Validate one field or step](https://vestjs.dev/docs/guides/focused-validation)
214214
- [Dependent and cross-field validation](https://vestjs.dev/docs/guides/dependent-fields)
@@ -219,14 +219,14 @@ Vest composes with schema validators and form managers; these categories are not
219219
- [Typed schemas and parsed results](https://vestjs.dev/docs/guides/typed-schemas)
220220
- [React Hook Form and schema integration](https://vestjs.dev/docs/guides/form-and-schema-integration)
221221
- [Next.js Server Actions and resumable state](https://vestjs.dev/docs/guides/nextjs-server-actions)
222-
- [Production registration architecture](https://vestjs.dev/docs/guides/production-architecture)
222+
- [Complete registration example](https://vestjs.dev/docs/guides/production-architecture)
223223
- [When not to use Vest](https://vestjs.dev/docs/guides/when-not-to-use-vest)
224224
225225
## Key Concepts
226-
- **Living Result**: A suite stores validation truth and reconciles new runs with previous field results.
226+
- **Retained Results**: A suite updates the fields that ran and keeps the results for the others.
227227
- **Focused Updates**: Validate a field, step, or group with \`suite.only()\` or \`suite.focus()\` while retaining everything else.
228228
- **Race-safe Async**: Pending work is tracked, obsolete runs are canceled, and stale async results are ignored.
229-
- **Progressive Workflows**: Model dependent fields, conditional sections, optional values, warnings, groups, and dynamic lists.
229+
- **Form Workflows**: Model dependent fields, conditional sections, optional values, warnings, groups, and dynamic lists.
230230
231231
## Advanced Features
232232
- **Server and SSR**: Use \`runStatic()\`, then serialize and resume full validation state in the browser.

website/docs/community_resources/standard_schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function EmailForm() {
4343
}
4444
```
4545

46-
The resolver is the simplest path when the form manager should invoke complete validation. To use Vest's progressive runtime during interaction, also run the changed field through the same suite:
46+
The resolver is the simplest option when the form manager should validate the whole form. To validate one field during interaction, run that field through the same suite:
4747

4848
```ts
4949
suite.only('email').run(form.getValues());

website/docs/concepts.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
22
sidebar_position: 2
3-
title: How Vest Thinks About Validation
4-
description: Understand Vest as a stateful runtime for validation that unfolds over time.
3+
title: How Vest Handles Validation
4+
description: See what a Vest suite remembers between runs and why that matters for interactive forms.
55
keywords:
66
[Vest, Stateful Validation, Progressive Validation, Validation Suite, Async]
77
---
88

9-
# How Vest Thinks About Validation
9+
# How Vest Handles Validation
1010

11-
Vest models validation as an evolving process, not just a function that parses an object once.
11+
Most validators inspect a value and return an answer. Vest can do that too, but a suite can also keep its result between runs.
1212

1313
A schema validator usually answers:
1414

1515
> Does this value match the required structure right now?
1616
17-
Vest answers a different set of questions:
17+
An interactive form has a few more questions:
1818

19-
> What changed? Which rules need to run? Which previous results are still trustworthy? Which async result is still current? Is the complete workflow ready to proceed?
19+
> What changed? Which rules need to run again? Can the other results stay as they are? Is this async response still current? Can the user continue?
2020
21-
This is why Vest is particularly useful for complex forms, onboarding flows, wizards, configuration interfaces, and other progressive workflows.
21+
Those questions come up in forms, onboarding, checkout flows, settings screens, and anywhere validation happens a little at a time.
2222

23-
## The three layers
23+
## What a suite gives you
2424

2525
### 1. Executable business rules
2626

@@ -42,9 +42,9 @@ const suite = create(data => {
4242

4343
The familiar syntax is valuable because it gives validation logic a consistent structure. Rules live outside UI components, support multiple tests per field, and can be unit-tested without simulating DOM events.
4444

45-
### 2. A living validation result
45+
### 2. One result that updates over time
4646

47-
A suite is more than a validation function. It stores the current truth about the workflow.
47+
A suite keeps the latest result for every test it has seen.
4848

4949
When `suite.run()` executes, Vest:
5050

@@ -65,13 +65,13 @@ Username changes
6565
→ ignore an older username request if it finishes late
6666
```
6767

68-
This is Vest's central capability: **do the minimum new work without losing the conclusions already earned**.
68+
The result is still complete even when the latest run only checked one field.
6969

7070
### 3. Assertions, schemas, and integration
7171

7272
`enforce` provides assertions, schemas, parsing, and custom rules. Vest suites and Enforce rules also implement Standard Schema for interoperability with compatible tools.
7373

74-
Schema validation answers structural questions before behavioral tests run. Stateful suite execution then manages how validation evolves during interaction.
74+
The schema checks and parses the input. The suite then keeps track of test results as the user interacts with the form.
7575

7676
## Validation state, not form state
7777

@@ -150,7 +150,7 @@ Real workflows are rarely independent field maps. Vest includes primitives for r
150150
- `each()` tracks dynamic list items with stable keys;
151151
- warnings provide guidance without blocking completion.
152152

153-
These are workflow concepts, not merely value matchers.
153+
These tools describe relationships between tests, not just the shape of a value.
154154

155155
## Errors are not the same as incompleteness
156156

@@ -166,12 +166,12 @@ That is different from an active validation error. Vest exposes `isTested`, `isP
166166

167167
Because suites do not depend on UI components, the same validation contract can be used with React, Vue, Svelte, Angular, vanilla JavaScript, or Node.js.
168168

169-
The framework decides when to invoke the suite and how to render it. Vest decides what validation work is relevant and maintains the resulting truth.
169+
Your framework decides when to run the suite and how to show its result. Vest keeps track of the validation itself.
170170

171-
## The core idea
171+
## In short
172172

173-
The test-like syntax makes Vest easy to learn. The stateful runtime is why it exists.
173+
Vest's test-like syntax is familiar, but the state kept by the suite is the important part.
174174

175-
> **Vest validates what changed, remembers what already passed, and prevents stale asynchronous validation results.**
175+
It lets you validate what changed without forgetting what already passed, and it prevents an old async response from overwriting a newer result.
176176

177177
Continue with [Understanding Vest's State](./understanding_state.md) or see [Vest alongside schema and form libraries](./vest_vs_the_rest.md).

website/docs/enforce/enforce.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ keywords:
2121

2222
# Enforce: The Assertion Library for Vest
2323

24-
Enforce is a powerful assertion library that powers Vest's validations. It's designed to be:
24+
Enforce is the assertion library used inside Vest tests. Its rules are:
2525

2626
- **Fluent** - Chain multiple assertions together naturally
2727
- **Composable** - Build reusable validators from smaller pieces

website/docs/get_started.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ keywords: [Vest, Tutorial, Stateful Validation, JavaScript, React, Vue, Svelte]
77

88
# Getting Started
99

10-
Vest is a **stateful validation runtime for complex forms and progressive workflows**.
10+
Vest is a validation library for forms and other flows that change over time.
1111

12-
It validates the field or step changing now, retains trustworthy results from earlier runs, and prevents obsolete asynchronous work from corrupting current validation state.
12+
It can validate only the field or step that changed, keep the results from earlier runs, and ignore an old async response when a newer one has already finished.
1313

1414
If you know Jest or Mocha, the authoring model will feel familiar: define a suite of named tests and use assertions to express the rules. The test-like syntax makes Vest approachable; its persistent validation runtime is what makes it different.
1515

1616
import GetStartedSandpack from '@site/src/components/Sandpack/GetStarted';
1717

1818
## The problem Vest solves
1919

20-
Interactive validation is not a one-time parse. A real form unfolds over time:
20+
Forms are rarely validated just once. While someone fills one out:
2121

2222
1. The user changes one field.
2323
2. Only the related rules should run.
@@ -26,7 +26,7 @@ Interactive validation is not a one-time parse. A real form unfolds over time:
2626
5. Async responses may arrive in the wrong order.
2727
6. The complete workflow still needs one reliable validation result.
2828

29-
Vest owns that process without owning your form values, DOM, or UI components.
29+
Vest handles the validation state without taking over your values, DOM, or components.
3030

3131
## Installation
3232

@@ -104,7 +104,7 @@ expect(invalid.hasErrors('password')).toBe(true);
104104

105105
The test exercises the same rules as the UI without rendering a component. Interactive application code should still use stateful `run()` so focused results can accumulate over time.
106106

107-
## When Vest is a strong fit
107+
## When Vest is useful
108108

109109
Use Vest when validation behavior includes:
110110

@@ -116,12 +116,12 @@ Use Vest when validation behavior includes:
116116
- errors, warnings, pending states, and progressive completion;
117117
- validation shared between browser and server.
118118

119-
For a one-shot API boundary parse, an Enforce schema's `.parse()` API may be all you need. For progressive workflows, the same Enforce schema can be attached to a Vest suite so Vest owns both parsed output and the interactive journey. Zod or another schema library can also be composed at the boundary.
119+
If you only need to parse an API payload once, an Enforce schema's `.parse()` method may be enough. Attach the same schema to a Vest suite when you also need validation while the user works through a form. You can use Zod or another schema library at the boundary instead if that is already part of your stack.
120120

121121
## Next steps
122122

123-
- **[Follow the ten-tutorial learning path](./tutorials.md)**: Build from a basic suite through async state, schemas, server validation, and custom rules.
124-
- **[Understand Vest's living result](./concepts.md)**: Learn the stateful runtime mental model.
123+
- **[Browse the tutorials](./tutorials.md)**: Start with a basic suite or jump to async checks, schemas, server validation, or custom rules.
124+
- **[See how Vest handles validation](./concepts.md)**: Understand what the suite remembers between runs.
125125
- **[Async validation without stale results](./writing_tests/async_tests.md)**: Coordinate overlapping server checks safely.
126126
- **[Focused updates](./writing_your_suite/focused_updates.md)**: Validate one field, step, or group.
127127
- **[Dependent fields](./writing_your_suite/including_and_excluding/include.md)**: Rerun related rules together.

0 commit comments

Comments
 (0)