notifyThrownForm()function

notifyThrownForm(store: FormStore<T>, form: HTMLFormElement, thrown: unknown): false
ParamType
storeFormStore<T>
The FormStore the thrown value is recorded on. required
formHTMLFormElement
The underlying HTMLFormElement notices are anchored to. required
thrownunknown
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 reason to the store splits it into per-field messages instead of a global notice.

Examples

notifyThrownForm(store, formEl, thrown)