Skip to content

Commit 63cd0d3

Browse files
Show form validation errors on user page
1 parent 72794ad commit 63cd0d3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

resources/js/Pages/Users/Create.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<input v-model="form.name"
2121
class="mb-2 shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
2222
id="name" type="text">
23-
<!-- <span class="text-red-500">{{ errors.name }}</span> -->
23+
<span class="text-red-500">{{ errors.name }}</span>
2424
</div>
2525

2626
<div class="mb-4">
@@ -30,7 +30,7 @@
3030
<input v-model="form.email"
3131
class="mb-2 shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
3232
id="email" type="email">
33-
<!-- <span class="text-red-500">{{ errors.email }}</span> -->
33+
<span class="text-red-500">{{ errors.email }}</span>
3434
</div>
3535

3636
<div class="mb-4">
@@ -50,7 +50,7 @@
5050
<input v-model="form.password"
5151
class="mb- 2shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
5252
id="password" type="password">
53-
<!-- <span class="text-red-500">{{ errors.password }}</span> -->
53+
<span class="text-red-500">{{ errors.password }}</span>
5454
</div>
5555

5656
<div class="flex items-center justify-between">
@@ -78,6 +78,9 @@ export default {
7878
AppLayout,
7979
Button
8080
},
81+
props: {
82+
errors: Object,
83+
},
8184
data() {
8285
return {
8386
form: this.$inertia.form({

0 commit comments

Comments
 (0)