summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-24 19:12:00 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-09-24 19:12:00 +0200
commitcf1c2bc8ed8fe73a1b0907b134863ff407516473 (patch)
tree81140eb4487eb235c6d05c70e27373a899a62471
parent12fb25c3f339f2ec45b12cb221670a3f167d32c1 (diff)
Signup an user with its name
-rw-r--r--pages/signup.vue14
1 files changed, 13 insertions, 1 deletions
diff --git a/pages/signup.vue b/pages/signup.vue
index 7f9e9ae..bcb847e 100644
--- a/pages/signup.vue
+++ b/pages/signup.vue
@@ -10,8 +10,16 @@
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);
}