diff --git a/src/components/lists/NewList.vue b/src/components/lists/NewList.vue index 1b6bd7ea8..78a371713 100644 --- a/src/components/lists/NewList.vue +++ b/src/components/lists/NewList.vue @@ -5,21 +5,29 @@

Create a new list

-
-
-

- -

-

- -

-
-
+ Add + +

+ +

+ Please specify at least three characters. +

@@ -33,6 +41,7 @@ name: "NewList", data() { return { + showError: false, list: ListModel, listService: ListService, } @@ -50,6 +59,12 @@ }, methods: { newList() { + if (this.list.title.length < 3) { + this.showError = true + return + } + this.showError = false + this.list.namespaceID = this.$route.params.id this.listService.create(this.list) .then(response => { diff --git a/src/components/namespaces/NewNamespace.vue b/src/components/namespaces/NewNamespace.vue index df007a328..d5fc60e61 100644 --- a/src/components/namespaces/NewNamespace.vue +++ b/src/components/namespaces/NewNamespace.vue @@ -5,22 +5,31 @@

Create a new namespace

-
-
-

- -

-

- -

-
-
-

What's a namespace?

+ Add + +

+ +

+ Please specify at least five characters. +

+

+ What's a namespace?

@@ -34,6 +43,7 @@ name: "NewNamespace", data() { return { + showError: false, namespace: NamespaceModel, namespaceService: NamespaceService, } @@ -51,6 +61,12 @@ }, methods: { newNamespace() { + if (this.namespace.name.length <= 4) { + this.showError = true + return + } + this.showError = false + this.namespaceService.create(this.namespace) .then(() => { this.$parent.loadNamespaces() diff --git a/src/components/tasks/ShowListTasks.vue b/src/components/tasks/ShowListTasks.vue index 5b6a5e7c3..d248ca423 100644 --- a/src/components/tasks/ShowListTasks.vue +++ b/src/components/tasks/ShowListTasks.vue @@ -31,24 +31,28 @@ -
-
+ +
+

- +

-

- +

+ Please specify at least three characters. +

+
@@ -154,6 +158,8 @@ taskEditTask: TaskModel, newTaskText: '', + showError: false, + showTaskSearch: false, searchTerm: '', } @@ -188,6 +194,12 @@ this.loadTasks(page) }, addTask() { + if (this.newTaskText.length < 3) { + this.showError = true + return + } + this.showError = false + let task = new TaskModel({text: this.newTaskText, listID: this.$route.params.id}) this.taskService.create(task) .then(r => {