Focus first input error using useForm #3740
albertcito
started this conversation in
Ideas
Replies: 2 comments
-
it's will be useful if there is a feature to focus the first input field that shows an error. |
Beta Was this translation helpful? Give feedback.
0 replies
-
We're also looking to achieve something similar, we have been using the component, i think it'd be great if the<Form> component could emit an event (onError ?) whenever the form errors change.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In a form with several required inputs, if the user click on submit it should focus the first error input.
In order to make it work I added the
register
function inuseForm
it has an array of all input registered:So I can call it with the function:
In
<template>
call my customInput
component:In my
Input
component:Beta Was this translation helpful? Give feedback.
All reactions