diff --git a/public/scripts/controllers/edit-controller.js b/public/scripts/controllers/edit-controller.js index b275e0f..791a890 100644 --- a/public/scripts/controllers/edit-controller.js +++ b/public/scripts/controllers/edit-controller.js @@ -99,8 +99,12 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', '$document', 'bookmar toastr.error('检撤到您的书签链接非法,是否忘记加http或者https了?建议直接从打开浏览器地址栏复制出来直接粘贴到输入框。', "错误"); return; } - if (selectedTags.length < 1) { - toastr.error('您至少要选择一个分类!如果暂时没想到放到哪个分类,可以先选择未分类', "错误"); + if (selectedTags.length < 1 || $scope.tagsError) { + toastr.error('您至少要选择一个分类!最多选择三个分类!如果暂时没想到放到哪个分类,可以先选择未分类', "错误"); + return; + } + if ($scope.titleError) { + toastr.error('书签标题不能为空!', "错误"); return; } if ($scope.add) {