You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/useform/seterror.mdx
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,14 +36,12 @@ The function allows you to manually set one or more errors.
36
36
setError("root.serverError", {
37
37
type:"400",
38
38
})
39
-
setError("root.random", {
40
-
type:"random",
41
-
})
42
39
```
43
-
- Can be useful in the `handleSubmit` method when you want to give error feedback to a user after async validation. (ex: API returns validation errors)
44
40
-`shouldFocus` doesn't work when an input has been disabled.
45
-
- This method will force set `isValid` formState to `false`. However, it's important to be aware that `isValid` will always be derived from the validation result of your input registration rules or schema result.
46
-
- There are certain keywords that need to be avoided to prevent conflicts with type checking. They are `type` and `types`.
41
+
- This method will force <code>formState.isValid</code> to <code>false</code>.
42
+
However, <code>isValid</code> is always derived from the validation results of your
43
+
registered inputs or schema.
44
+
- There are certain keywords that need to be avoided to prevent conflicts with type checking.
0 commit comments