C
C
Capablanca2017-03-15 19:53:28
Vue.js
Capablanca, 2017-03-15 19:53:28

How to do form validation in vue.js?

Hello!
I am trying to move to the IT department in my company from a completely different position.
I do all kinds of small layout, micro-tasks, I started learning js.
A test task has been received - you need to make a "feedback" validation form using only bootstrap and vue.js.
There are full name, mail and message text fields. You need to make the Submit button inactive until all the fields are filled in and that errors are displayed if a field is filled in incorrectly (
Googled a bunch of examples where vue plugins are used for validation, but did not find anything about pure vue.js. according to the conditions of the assignment, even the jquery library.
Can someone tell me what to build on?
Please help :3

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Bogachev, 2017-03-15
@Capablanca

Of course, no one will do the task for you completely. But you can make a leading example - codepen . The general idea should be clear: with the help of v-model we associate data with inputs, with the help of computed properties we check the data for correctness. In the example, there is only one field, you need to expand it to several.

K
Klein Maximus, 2017-09-11
@kleinmaximus

https://monterail.github.io/vuelidate/

A
Alexander Kalinin, 2018-06-24
@kentovsky

Reading Documentation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question