You can view notes on translation and localisation in the full vue-validate custom rules docs.
To handle form submissions, we can make use of Vue’s submit event handler.
HTML form elements work a little bit differently from other DOM elements in React, because form elements naturally keep some internal state.
For example, this form in plain HTML accepts a single name: This form has the default HTML form behavior of browsing to a new page when the user submits the form. But in most cases, it’s convenient to have a Java Script function that handles the submission of the form and has access to the data that the user entered into the form.
We can also plug in the .prevent modifier to prevent the default action, which in this case would be the page refreshing when the form is submitted: In the above example, we simply log the entire form model to the console on form submission.
We can add one final touch with vee-validate to make sure that users aren’t allowed to submit an invalid form.
Learning to work with forms properly in our favourite frameworks is valuable, and can save us some time and energy during development.
It works perfectly with any app, regardless of framework, and has plugins to log additional context from Redux, Vuex, and @ngrx/store.
The latter then only takes care of showing visually to the user what is happening.