You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/pages/tutorials/basics.mdx
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ First, start by adding some markup, you can start by having a `form` wrapping a
81
81
```vue
82
82
<template>
83
83
<div id="app">
84
-
<form>
84
+
<form novalidate>
85
85
<input type="email" name="email" />
86
86
87
87
<button>Sign up for newsletter</button>
@@ -100,6 +100,8 @@ You will notice that the form submits and you should see `?email=` added in your
100
100
101
101
This is the native HTML form submission behavior. Usually, in modern applications, you don't want that and you prefer to handle submission with JavaScript.
102
102
103
+
The `novalidate` attribute on the `<form>` element is meant to disable the native HTML form validation, we will get to validating the form by the end of this tutorial.
104
+
103
105
<divclass="tutorial-step">
104
106
105
107
Add a `submit` event handler that prevents the native form submission, we will use `onSubmit` function to handle our form submission.
@@ -109,7 +111,7 @@ Add a `submit` event handler that prevents the native form submission, we will u
109
111
```vue{3,13-17}
110
112
<template>
111
113
<div id="app">
112
-
<form @submit.prevent="onSubmit">
114
+
<form novalidate @submit.prevent="onSubmit">
113
115
<input type="email" name="email" />
114
116
115
117
<button>Sign up for newsletter</button>
@@ -144,7 +146,7 @@ VeeValidate exposes 2 components that you will be using regularly, the `<Field>`
0 commit comments