From eef020faaebf2a50ff1c42698225fd431178f5e6 Mon Sep 17 00:00:00 2001
From: Bubka <858858+Bubka@users.noreply.github.com>
Date: Sun, 18 Sep 2022 16:27:42 +0200
Subject: [PATCH] Add maxlength attribute to name and email fields
---
resources/js/components/FormField.vue | 6 ++++++
resources/js/views/auth/Register.vue | 4 ++--
resources/js/views/settings/Account.vue | 4 ++--
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/resources/js/components/FormField.vue b/resources/js/components/FormField.vue
index 67ec3edd..5826e29e 100644
--- a/resources/js/components/FormField.vue
+++ b/resources/js/components/FormField.vue
@@ -11,6 +11,7 @@
:placeholder="placeholder"
v-bind="$attrs"
v-on:change="$emit('field-changed', form[fieldName])"
+ :maxlength="this.maxLength"
/>
@@ -69,6 +70,11 @@
isDisabled: {
type: Boolean,
default: false
+ },
+
+ maxLength: {
+ type: Number,
+ default: null
}
}
}
diff --git a/resources/js/views/auth/Register.vue b/resources/js/views/auth/Register.vue
index 6892e35f..940421eb 100644
--- a/resources/js/views/auth/Register.vue
+++ b/resources/js/views/auth/Register.vue
@@ -23,8 +23,8 @@