From cf1c2bc8ed8fe73a1b0907b134863ff407516473 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 24 Sep 2022 19:12:00 +0200 Subject: Signup an user with its name --- pages/signup.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'pages/signup.vue') diff --git a/pages/signup.vue b/pages/signup.vue index 7f9e9ae..bcb847e 100644 --- a/pages/signup.vue +++ b/pages/signup.vue @@ -9,9 +9,17 @@ form.mt-8.space-y-6(method="POST") input(type="hidden" name="remember" value="true") .-space-y-px.rounded-md.shadow-sm + div + label.sr-only(for="username") Username + input#name.relative.block.w-full.appearance-none.rounded-none.rounded-t-md.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500( + name="name" type="text" autocomplete="name" required + class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" + :class="{'border-red-500 z-10' : errors.name }" + placeholder="Your name" v-model="form.name" + ) div label.sr-only(for="email") Email - input#email.relative.block.w-full.appearance-none.rounded-none.rounded-t-md.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500( + input#email.relative.block.w-full.appearance-none.rounded-none.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500( name="email" type="email" autocomplete="username" required class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm border-2" :class="{'border-red-500 z-10' : errors.email }" @@ -97,6 +105,10 @@ export default { this.$set(this.errors, "password1", true); } + if (err.indexOf("name:") >= 0) { + this.$set(this.errors, "name", true); + } + if (err.indexOf("email:") >= 0) { this.$set(this.errors, "email", true); } -- cgit v1.2.3-18-g5258