q-form validation: wrong error-position
-
Hi,
my headline said it all. After submitting a q-form and getting an error, the focus is below the false field…
How can i customize this? On the Picture: The first wrong field is above “Nachname”…
P.S: the same if q-form is not in greedy-mode… - thus always below
Thx - Mark -
Try putting refs on your inputs and call the
focus()
method for the top most field with the error?Scott
-
Got it working this way… if someone knows: how do i get inputs with erros in an easy way?
onValidationError () {
this.$q.notify({
color: ‘red-5’,
textColor: ‘white’,
icon: ‘warning’,
message: ‘Errors…’
})window.scrollTo(0, 0) },