notifyThrownForm()function
notifyThrownForm(store: FormStore<T>, form: HTMLFormElement, thrown: unknown): false
| Param | Type | |
|---|---|---|
store | FormStore<T> | The FormStore the thrown value is recorded on. required |
form | HTMLFormElement | The underlying HTMLFormElement notices are anchored to. required |
thrown | unknown | The value thrown during submit. required |
| Return | |
|---|---|
false | Always false, signalling the submit failed. |
Notify the user about a value thrown during submit, storing string errors as form field messages.
- Assigning a string
reasonto the store splits it into per-field messages instead of a global notice.
Examples
notifyThrownForm(store, formEl, thrown)