Skip to content

Commit 38d349c

Browse files
committed
Add "setErrors" to README
1 parent bdaa732 commit 38d349c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

README.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,16 @@ In this example, if the form is invalid (`!form.isValid`), we loop through the `
191191
192192
The `useAJVForm` hook provides a set of utilities and state indicators for robust form management and validation. Below is a detailed description of each export from the hook:
193193
194-
| Export | Type | Description |
195-
| ---------- | ----------- | -------------------------------------------------------------------------- |
196-
| `reset` | `Function` | Resets the form to its initial state. |
197-
| `set` | `Function` | Sets the state for a specific form field. |
198-
| `validate` | `Function` | Validates the entire form against the provided AJV schema. |
199-
| `onBlur` | `Function` | Handler function to be called on the onBlur event of a form field. |
200-
| `isValid` | `boolean` | Indicates whether the form is currently valid according to the schema. |
201-
| `isDirty` | `boolean` | Indicates whether the form has been modified from its initial state. |
202-
| `state` | `IState<T>` | The current state of the form, including values and errors for each field. |
194+
| Export | Type | Description |
195+
| ----------- | ----------- | ---------------------------------------------------------------------------------------- |
196+
| `reset` | `Function` | Resets the form to its initial state. |
197+
| `set` | `Function` | Sets the state for a specific form field. |
198+
| `validate` | `Function` | Validates the entire form against the provided AJV schema. |
199+
| `onBlur` | `Function` | Handler function to be called on the onBlur event of a form field. |
200+
| `isValid` | `boolean` | Indicates whether the form is currently valid according to the schema. |
201+
| `isDirty` | `boolean` | Indicates whether the form has been modified from its initial state. |
202+
| `state` | `IState<T>` | The current state of the form, including values and errors for each field. |
203+
| `setErrors` | `Function` | Programmatically set the error, or multiple errors. E.g. errors originating from the API |
203204
204205
## Options
205206

0 commit comments

Comments
 (0)