Skip to content

Commit 2e80598

Browse files
committed
Update forms.mdx
1 parent c79339d commit 2e80598

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

v2/the-basics/forms.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,8 @@ In React and Vue, refs provide access to all form methods and reactive state. In
956956

957957
### Precognition
958958

959+
<Badge>v2.3+</Badge>
960+
959961
The `<Form>` component includes built-in support for [Laravel Precognition](https://laravel.com/docs/precognition), enabling real-time form validation without duplicating your server-side validation rules on the client.
960962

961963
<Note>
@@ -1984,8 +1986,14 @@ form.submit(store())
19841986

19851987
### Precognition
19861988

1989+
<Badge>v2.3+</Badge>
1990+
19871991
Just like the `<Form>` component, the `useForm` helper supports [Precognition](#precognition) for real-time validation. You may enable it by chaining the `withPrecognition()` method with the HTTP method and endpoint for validation requests.
19881992

1993+
<Note>
1994+
Precognition requires server-side support. Laravel users should see the [Laravel Precognition documentation](https://laravel.com/docs/precognition) for setup instructions. For other frameworks, see the [protocol page](/v2/core-concepts/the-protocol#request-headers) for implementation details.
1995+
</Note>
1996+
19891997
<CodeGroup>
19901998

19911999
```js Vue icon="vuejs"
@@ -2026,6 +2034,10 @@ const form = useForm('post', '/users', {
20262034
})
20272035
```
20282036

2037+
<Tip>
2038+
Since Precognition is now built-in, you may remove the `laravel-precognition` package and import `useForm` from your Inertia adapter instead.
2039+
</Tip>
2040+
20292041
You may also use [Wayfinder](https://github.com/laravel/wayfinder) when enabling Precognition.
20302042

20312043
```js

0 commit comments

Comments
 (0)