Skip to content

Commit 5e8305a

Browse files
authored
Add error key to form description.mdx (#1063)
1 parent 0ab30e2 commit 5e8305a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/useform/form.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ All props are optional
4040
| `render` | <TypeText>`Function`</TypeText> | Render prop function suitable for headless component. | <CodeArea withOutCopy rawData="<Form render={({ submit }) => <View/>} />" /> |
4141
| `onSubmit` | <TypeText>`Function`</TypeText> | Function invoked after successful validation. | <CodeArea withOutCopy rawData="<Form onSubmit={({ data }) => mutation(data)} />"/> |
4242
| `onSuccess` | <TypeText>`Function`</TypeText> | Function called after successful request to the server. | <CodeArea withOutCopy rawData="<Form onSuccess={({ response }) => {}} />" /> |
43-
| `onError` | <TypeText>`Function`</TypeText> | Function called after failed request to the server.<br/><br/>`setError` function will be called to update errors state. | <CodeArea withOutCopy rawData="<Form onError={({ response }) => {}} />" /> |
43+
| `onError` | <TypeText>`Function`</TypeText> | Function called after failed request to the server.<br/><br/>`setError` function will be called to update errors state. `root.server` will be used as error key. | <CodeArea withOutCopy rawData="<Form onError={({ response }) => {}} />" /> |
4444
| `headers` | <TypeText>`Record<string, string>`</TypeText> | Request headers object. | <CodeArea withOutCopy rawData="<Form headers={{ accessToken: 'xxx', 'Content-Type': 'application/json' }} />"/> |
4545
| `validateStatus` | <TypeText>`(status: number) => boolean`</TypeText> | Function to validate status code. | <CodeArea withOutCopy rawData="<Form validateStatus={status => status === 200} />" /> |
4646

0 commit comments

Comments
 (0)