aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/EditPage.vue8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/EditPage.vue b/src/components/EditPage.vue
index 21d9ea9..84548cd 100644
--- a/src/components/EditPage.vue
+++ b/src/components/EditPage.vue
@@ -130,6 +130,10 @@ export default {
// Resets errors bag when using the lazy-validation prop.
form.reset();
},
+ resetValidation(form) {
+ // Resets validation of all registered inputs without modifying their state
+ form.resetValidation();
+ },
write(form) {
if (form == this.$refs.form1 && this.title in this.LSData) {
this.$emit("snackbarNotification", "Title already exists");
@@ -142,8 +146,8 @@ export default {
this.LSData[this.title] = this.content;
this.writeToLS();
this.$emit("snackbarNotification", "Done!");
- // Let's do a reset.
- this.reset(form);
+ // Let's do a validation reset.
+ this.resetValidation(form);
// Re-read all items.
this.readAllItems();
},