diff --git a/docs/config.json b/docs/config.json index 714371ee5..fcfef6fd5 100644 --- a/docs/config.json +++ b/docs/config.json @@ -416,8 +416,8 @@ "label": "react", "children": [ { - "label": "Balastrong's Tutorials", - "to": "framework/react/community/balastrongs-tutorials" + "label": "Balastrong's Tutorial", + "to": "framework/react/community/balastrong-tutorial" } ] } diff --git a/docs/framework/angular/guides/basic-concepts.md b/docs/framework/angular/guides/basic-concepts.md index 3f8860260..0fa5d6bf0 100644 --- a/docs/framework/angular/guides/basic-concepts.md +++ b/docs/framework/angular/guides/basic-concepts.md @@ -114,14 +114,21 @@ export class AppComponent { } ``` -## Validation Adapters +## Validation with Schema Libraries -In addition to hand-rolled validation options, we also provide adapters like `@tanstack/zod-form-adapter`, `@tanstack/yup-form-adapter`, and `@tanstack/valibot-form-adapter` to enable usage with common schema validation tools like [Zod](https://zod.dev/), [Yup](https://github.com/jquense/yup), and [Valibot](https://valibot.dev/). +In addition to hand-rolled validation options, we also support the [Standard Schema](https://github.com/standard-schema/standard-schema) specification. + +You can define a schema using any of the libraries implementing the specification and pass it to a form or field validator. + +Supported libraries include: + +- [Zod](https://zod.dev/) +- [Valibot](https://valibot.dev/) +- [ArkType](https://arktype.io/) Example: ```angular-ts -import { zodValidator } from '@tanstack/zod-form-adapter' import { z } from 'zod' @Component({ @@ -132,7 +139,6 @@ import { z } from 'zod' { - await new Promise((resolve) => setTimeout(resolve, 1000)) - return !value.includes('error') - }, - { - message: "No 'error' allowed in first name", - }, - ), - }} -/> +function App() { + const form = useForm({ + defaultValues: { + age: 0, + }, + validators: { + onChange: userSchema, + }, + }) + return ( +
+ { + return <>{/* ... */} + }} + /> +
+ ) +} ``` ## Reactivity diff --git a/docs/framework/solid/guides/basic-concepts.md b/docs/framework/solid/guides/basic-concepts.md index eb3cf2a13..766b92545 100644 --- a/docs/framework/solid/guides/basic-concepts.md +++ b/docs/framework/solid/guides/basic-concepts.md @@ -139,20 +139,24 @@ Example: /> ``` -## Validation Adapters +## Validation with Schema Libraries -In addition to hand-rolled validation options, we also provide adapters like `@tanstack/zod-form-adapter`, `@tanstack/yup-form-adapter`, and `@tanstack/valibot-form-adapter` to enable usage with common schema validation tools like [Zod](https://zod.dev/), [Yup](https://github.com/jquense/yup), and [Valibot](https://valibot.dev/). +In addition to hand-rolled validation options, we also support the [Standard Schema](https://github.com/standard-schema/standard-schema) specification. -Example: +You can define a schema using any of the libraries implementing the specification and pass it to a form or field validator. + +Supported libraries include: + +- [Zod](https://zod.dev/) +- [Valibot](https://valibot.dev/) +- [ArkType](https://arktype.io/) ```tsx -import { zodValidator } from '@tanstack/zod-form-adapter' import { z } from 'zod' // ... ``` -## Validation Adapters +## Validation with Schema Libraries -In addition to hand-rolled validation options, we also provide adapters like `@tanstack/zod-form-adapter`, `@tanstack/yup-form-adapter`, and `@tanstack/valibot-form-adapter` to enable usage with common schema validation tools like [Zod](https://zod.dev/), [Yup](https://github.com/jquense/yup), and [Valibot](https://valibot.dev/). +In addition to hand-rolled validation options, we also support the [Standard Schema](https://github.com/standard-schema/standard-schema) specification. -Example: +You can define a schema using any of the libraries implementing the specification and pass it to a form or field validator. + +Supported libraries include: + +- [Zod](https://zod.dev/) +- [Valibot](https://valibot.dev/) +- [ArkType](https://arktype.io/) ```vue