N
N
Nikolai Khoziashev2021-05-14 12:06:12
Vue.js
Nikolai Khoziashev, 2021-05-14 12:06:12

How to highlight an input only if an error came from the server?

<b-form-group
    :invalid-feedback="fieldErrors.title" // fieldErrors.title - ошибка сервера по конкретному полю
    :state="validation"
>
    <b-form-input type="text" :state="validation" />
</b-form-group>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GooFFu, 2021-05-14
@The_Last_Dot

Knowing the possible server responses, you need to assign the corresponding values ​​to the input states : true, false, null.
You can read how to do this here or here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question